Gamestudio Links
Zorro Links
Newest Posts
C++ scripts
by AndrewAMD. 07/02/22 13:02
FXCM doesn't show up in Broker drop-down
by Smallz. 07/02/22 12:32
History & HistoryFolder
by DdlV. 07/01/22 14:57
car.c how to add a trailer or wagon?
by Ice2642. 07/01/22 13:35
IB: brokercommand to cancel **all** orders.
by AndrewAMD. 06/30/22 17:21
Save As dialog box (like file_select)
by jcl. 06/30/22 10:18
AUM Magazine
Latest Screens
DEAD TASTE
Tactics of World War I
Hecknex World
Scheherazade's Journey
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 446 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Anas, PeroPero, AlexTomb, BigW, QJSH
18790 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Emulate non-tick mode in live trading #486207
06/23/22 18:47
06/23/22 18:47
Joined: Aug 2021
Posts: 82
M
MegaTanker Offline OP
Junior Member
MegaTanker  Offline OP
Junior Member
M

Joined: Aug 2021
Posts: 82
Haven't found anything in the manual but maybe I missed it. Normally in Test mode with M1 date Stops etc. are evaluated once per bar (without TICKS mode). But in trading, they are evaluated at every tick received by the broker plugin. In the interest of keeping the conditions the same between Test and Trade mode, is there a feature to only have Stops etc. evaluated once per bar in Trade mode?

Re: Emulate non-tick mode in live trading [Re: MegaTanker] #486208
06/23/22 18:54
06/23/22 18:54
Joined: Feb 2017
Posts: 1,481
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,481
Chicago
To do that, check for exit conditions at run() calls only and don't set Stop. Loop through your open trades and exit the ones that are losing too much.

Re: Emulate non-tick mode in live trading [Re: MegaTanker] #486221
06/26/22 06:49
06/26/22 06:49
Joined: Apr 2008
Posts: 546
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 546
Austria
Better do it the other way, set TICKS when it makes a large difference.

When in live trading a stop is hit, you normally dont want to wait for the next bar to exit, do you?

Re: Emulate non-tick mode in live trading [Re: MegaTanker] #486222
06/26/22 09:59
06/26/22 09:59
Joined: Aug 2021
Posts: 82
M
MegaTanker Offline OP
Junior Member
MegaTanker  Offline OP
Junior Member
M

Joined: Aug 2021
Posts: 82
Problem is this is already on 1 min bars and I don't have more precise data than that. In that case it would make sense to have the real trading session be consistent with the backtest system. It might make little to no difference, but the problem is I can't simply find out.

But yes, manual exit checks once per bar are of course an option to make it consistent.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1