Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, rki), 390 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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: 49
Köln
S
StefanCGN Offline OP
Newbie
StefanCGN  Offline OP
Newbie
S

Joined: Jul 2019
Posts: 49
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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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