I use eSignal as my data feed. I intend to do live trading by triggering backtests every minute, through batch scheduler. Order management processes will be handled using internetopenurl() function, through custom backtester framework. I've built an external order management tool to handle the rest.
My concern is, will the candle formation time and scheduler time be in sync? For example, if the backtest is triggered at 10:01am, is it guaranteed that the 'close' of 1 minute candle of 10:01am will be considered in the backtest, or do I stand a chance of missing part of that candle data in realtime?
Thanks in advance. Been using Amibroker for 3 weeks now and I'm totally in love with it!
Very nice, as more you use AB you will love it more.
First of all I don’t think you run backtest you have a typo here and you should write Scan or explore.
Any way I was thinking how to solve this question, and I end up with easy solution without any coding.
If you watch the your clock and a new minute comes, then HIT on your keyboard the ENTER while you mouse is on the AR interval.
That was easy and clean solution.
One more complicated solution is this one but you have to write code that I DO-NOT recommends you .
you may need to read this, this, and this.
if( NewBar )
// insert your code in here to execute Once per NewBar
ShellExecute( "runbatch", "Test.ABB", "" );
I'm yet to understand how to use explore and do live trading. But I've figured out how to use the custom backtester framework to achieve it. Hence my choice. But I'll definitely look into exploration method as well.
I've already tried the newbar approach. It triggers the batch on time, but the batch process doesn't end by itself when invoked programmatically. From the second candle onwards, the batch throws an error saying anothe batch process is running.
The reason he mentioned scan/explore is that backtest is not meant for live trading.
Custom backtester is just a way to manipulate the backtest engine for some reason.
Never attempted live auto trading due to lack of knowledge of coding/my method and strategies are simple enough to manually enter orders at end of day.
Live auto trading would involve running your AFL via a chart or explore/scan with auto repeat set.
One would also have to code in retrieving orders, executions, positions, etc for all logic. The tools are there for instance with Ibcontroller if you look at the documentation but it’s above my level.