Gamestudio Links
Zorro Links
Newest Posts
MT4 - use more Zorro script
by Grat. 09/22/20 06:49
Rubbish data from Yahoo
by DanielX. 09/21/20 21:06
Single advise model for portfolio
by jmlocatelli. 09/21/20 19:41
Special Bars Script
by jcl. 09/21/20 06:37
What are you working on?
by rayp. 09/20/20 17:18
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
9 registered members (Grat, jenGs, alibaba, DanielX, kvm, danatrader, Alvin, Mio, 1 invisible), 439 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
NewBorn, 3dvg, secretagentman, distribution, EditeY
18515 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to handle profit in a TMF during training #478756
12/09/19 20:09
12/09/19 20:09
Joined: Jul 2019
Posts: 46
Köln
S
StefanCGN Offline OP
Newbie
StefanCGN  Offline OP
Newbie
S

Joined: Jul 2019
Posts: 46
Köln
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);}

Last edited by StefanCGN; 12/09/19 20:19.
Re: How to handle profit in a TMF during training [Re: StefanCGN] #478791
12/19/19 13:43
12/19/19 13:43
Joined: Jul 2000
Posts: 27,343
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,343
Frankfurt
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.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1