How to handle profit in a TMF during training

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:

Code
 if(TradeIsOpen && TradeProfit > level) {
		TradeTrailLock = 0.3; 
    if(TradeIsShort)
      TradeTrailLimit = max(TradeTrailLimit,TradePriceClose);
    else
 TradeTrailLimit = min(TradeTrailLimit,TradePriceClose);}
Posted By: jcl

Re: How to handle profit in a TMF during training - 12/19/19 13:43

There is a TrainMode flag for training with the lot size set by the script. Training is then slightly slower and the used money management will affect the parameters.
© 2024 lite-C Forums