I am trying to apply a dynamic stoploss to my automatic trading strategy. The BollingBand width is used for setting the stoploss. I got this to work. But the problem I am having is that I only want to dynamicly determine what the stoploss must be, at the pricelevel at which the position is taking.
As it is now the stoploss is changing whenever the bollingband width is changing. How can I change in Easy Language that it will use the dynamic determined stoploss, as an fixed stoploss once the position is taken.
My code for the stoploss:
Code: Select all
inputs:RiskRewardAmt(2)
StockAmt(2500)
Variables: Stopvalue(0)
Stopvalue = (StockAmt * (Topband-Bottomband))/RiskRewardAmt);
SetStopLoss(Stopvalue);