I am using 15minute timeframe. Now I was expecting to have “weightedStop” being calculated every 15minutes and for the next 15minutes the calculated value will be used as trailing stop loss. Instead the trailing stop loss is changing throught a 15 minute candle, therefor I guess that the formular is constantly recalculating the stop loss value, because I set a formular that is depending on weightedaverages, which is “changing” with every tick.
Am I understanding this correctly?
If so, how can I workaround this? I am thinking of something like “value(weightedStop)”, but I wasn’t able to find anything close in the documentation.
Roberto, does not SET STOPPTRAILING (used in code above) execute / move at each 1 point move in price (i.e. not wait until close of bar) after – in the case above – weightedStop condition has been met?
Put another way, TS Start = price moves by >= weightedStop then TS follows price for each 1 point move in price.