Jump to content
Elie

Equalized risk+ a profit target / range hotkey

Recommended Posts

Hi Guys, I'm trying to use the hotkey that sets an Equalized risk+ a profit target / range based on R,  :  CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=40/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=200;Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+

when I change the R from 1 to 3 StopPrice*3+Ask;    it some how don't show the stop loss and the target on the chart and on the orders as well, any idea why is that ?

Share this post


Link to post
Share on other sites

@Pete B Hi Peter, Thanks for the resond, I don't know what you mean, the hotkey advanced script is enabled,

the hotkey works perfectly only with 1R, when I change the R in the script to 2 or 3 ( StopPrice*3+Ask)

it does not work any more in temrm of showing the stop loss and the profit target on the chart and on the orders

Share this post


Link to post
Share on other sites

you are not using advanced hotkey script

Share this post


Link to post
Share on other sites

you enabled the possibility to use advanced script syntax but your syntax is the old syntax not the advanced syntax as explained here. i bet you get plenty of syntax errors in your log file.

Share this post


Link to post
Share on other sites
Posted (edited)

@Pete B Hey Peter, yes your right, I do get errors, I think I understand what you mean now, this specific hotkey script has an old syntax, and I should use yours instead: 

CXL ALLSYMB;
$buyprice=Ask;
$risk=20;
$mystop=price;
$pricetostop=$buyprice-$mystop;
$target=3*$pricetostop+Ask;
$amount=$risk/$pricetostop;
SShare=$amount;
Share=$amount;
TogSShare;
ROUTE=”SMRTL”;
Price=$buyprice;
Price=ROUND2;
TIF=DAY+;
BUY=Send;
TriggerOrder=RT:STOP STOPTYPE:RANGEMKT LowPrice:$mystop HighPrice:$target ACT:SELL QTY:POS TIF:DAY+;

am I right ?

Edited by Elie

Share this post


Link to post
Share on other sites
Posted (edited)

Preferably yes, because the old syntax is confusing while the new syntax is easier to understand with the custom variables. watch out for the quotes, they get copied wrong very often so make sure you rewrite them in your DAS

Edited by peterB

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.