Posted By: StefanCGN
How to handle profit in a TMF during training - 12/09/19 20:09
Hi,
I am using profit in a TMF to adapt stops in dependency of actual profit of a trade. For this I want to optimize the thresholds using the optimize-function. As it buys always only one lot only, the profit during training is different than in real trading.
How can I handle profit to overcome this issue?
Current part of TMF looks like this:
I am using profit in a TMF to adapt stops in dependency of actual profit of a trade. For this I want to optimize the thresholds using the optimize-function. As it buys always only one lot only, the profit during training is different than in real trading.
How can I handle profit to overcome this issue?
Current part of TMF looks like this:
Code
if(TradeIsOpen && TradeProfit > level) { TradeTrailLock = 0.3; if(TradeIsShort) TradeTrailLimit = max(TradeTrailLimit,TradePriceClose); else TradeTrailLimit = min(TradeTrailLimit,TradePriceClose);}