Jump to content

Recommended Posts

Hi all,

I'm using a hotkey at the moment to enter a trade, i double click on the chart to set a Price below the Ask (when going Long, vice versa if going Short) that i want to set as my risk. My risk at the moment is 1R/$5 and using this the hotkey calculates the number of shares i can purchase based on that risk amount. After placing my order, the hotkey then set's a limit order to exit my trade should it not go my way and i hit my -1R stop loss.

My question is, does anyone know how i need to alter the script to set my stop loss at -0.5R. I still want to buy as if i'm risking $5, but exit my trade automatically if i reach -$2.50. I'm new, still in SIM, and want to test this on my trades to see if it helps reduce the number of -1R losses without impacting the number of green trades (significantly enough to outweigh the benefits of smaller losses on red trades).

The script i'm using right now is:

StopPrice=Price-0;DefShare=BP0.925;Price=Ask-Price;SShare=5/Price;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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

 

Any help with the script, or also thoughts on this suggestion of setting my SL to -0.5R rather than -1R, would be greatly appreciated. Thanks.

Edited by danielmckenna

Share this post


Link to post
Share on other sites
On 9/8/2021 at 8:56 AM, danielmckenna said:

StopPrice=Price-0;DefShare=BP0.925;Price=Ask-Price;SShare=5/Price;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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

 

I think if you change 5 by 2.5 it should work

 

StopPrice=Price-0;DefShare=BP0.925;Price=Ask-Price;SShare=2.5/Price;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=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

 

Please test in SIM first

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • 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.