Jump to content

ITO

Lifetime Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by ITO


  1. On 2/6/2024 at 9:52 PM, yoshi_kk said:

    Hi.

    I'm using this script to trade options. Since actual dollar risking amount is x100 of the contract price with options, I tried to use 'SShare=0.5/Price' to mean that I want to risk $50 (0.5 x 100). 
     

    It works fine, as long as where I double click on the chart where I want to place my stop is within $0.5 from the current price. Say current option price on the chart is at $3.50 and I want to place my stop at $3.01, it works fine.

    However if I try to set my stop at $2.95, nothing happens. I suspect there's some error calculating number of contracts to buy when it passes $3.00 mark. I am suspecting something like the number of shares to buy become below 1 and that's considered 0 (?)

    Is there any way to modify this to at least buy 1 contract even if my stop loss is more than $0.5 away from current price? I understand by doing this, my risk will be more than $50 in this case.

    Thank you. 

    If I understand correctly ur $ Risk is $50 and you would like to set the number of contracts automatically.  I would use the following  SShare=50/Price/100.  Once u selected ur SL on the chart by Dbl+Cliking  (Price=Ask-Price+0.01), U r saying that the number of contracts to trade is MyRisk/SL/100  , in ur case 50/0.5/100 = 1 contract.  That is y u it would work around the 0.5 area.  Hope that helps.

    The formula is :  $RISK/SL/100

    here SL or Price=Ask-Price+0.01 u r actually saying that my SL=Ask - My_Selected_Price +0.01 $ to make sure that u r within ur parameters. the "Price" within the formula is the one u clicked.

    The following is the way I have mine setup :

    StopPrice=Price-0.01;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=500/Price/100;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=0;TriggerOrder=RT:STOP STOPTYPE:LIMIT PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.