Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

Elie

Equalized risk+ a profit target / range hotkey

Recommended Posts

Elie

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
peterB

 

any reason why you do it this way and do not do it this way instead?

Edited by peterB

Share this post


Link to post
Share on other sites
Elie

@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
peterB

you are not using advanced hotkey script

Share this post


Link to post
Share on other sites
Elie

@Pete B, Hey Peter, it's enabled in my setting, that's what you mean ?

image.png

Share this post


Link to post
Share on other sites
peterB

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
Elie

@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
peterB

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
Elie

great, thanks peter

Share this post


Link to post
Share on other sites

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

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.