Gamestudio Links
Zorro Links
Newest Posts
EUR/USD .t6 for 2019
by kalmar. 01/25/20 22:56
Average Position Up
by AndrewAMD. 01/25/20 17:44
Add safety string functions ("strcpy_s", etc.)
by AndrewAMD. 01/25/20 16:43
Imgui Lite-c Development
by txesmi. 01/23/20 23:26
Warning: Data both split and skipped!
by StefanCGN. 01/22/20 19:10
Simulate complex commission costs [Test]
by AndrewAMD. 01/22/20 13:05
Any Old Timers Still Around?
by Eagle. 01/21/20 21:51
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
2 registered members (AndrewAMD, Dooley), 801 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
andy_sh, dolorado, alterpips, Leohermoso, matchristrading
18360 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: 29
StefanCGN Offline OP
StefanCGN  Offline OP

Joined: Jul 2019
Posts: 29

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:

 if(TradeIsOpen && TradeProfit > level) {
		TradeTrailLock = 0.3; 
      TradeTrailLimit = max(TradeTrailLimit,TradePriceClose);
 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,095
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at)

Powered by UBB.threads™ PHP Forum Software 7.7.1