Emulate non-tick mode in live trading

Posted By: MegaTanker

Emulate non-tick mode in live trading - 06/23/22 18:47

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?
Posted By: AndrewAMD

Re: Emulate non-tick mode in live trading - 06/23/22 18:54

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.
Posted By: Petra

Re: Emulate non-tick mode in live trading - 06/26/22 06:49

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?
Posted By: MegaTanker

Re: Emulate non-tick mode in live trading - 06/26/22 09:59

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.
© 2024 lite-C Forums