Is there anyway to write a script for setting a target price for the ongoing trade?

suppose bought a security at ‘x’ price and ready to exit at ‘x+10’. Is it possible to do that?

Hi ,

In AFL U can do with the below formula…

Buy = “ur Condn”;

Short = “Ur Condn”;

Buy = Exrem(buy,Short);

Short = Exrem(Short,Buy);

Profit = 10;

BPrice = Valuewhen(Buy,C);

SPrice = Valuewhen(Short,C);

BTgt = BPrice + Profit;

STgt = SPrice - Profit;

Sell = Cross(C,BTgt) ;

Cover = Cross(STgt,C) ;

Sell = Exrem(Sell,Buy);

Cover = Exrem(Cover,Short);

2 Likes