I have multiple strategies that uses EOD data. Some of these strategies will run on one symbol and some will run on multiple symbols (separately, meaning each strategy instance only trades one instrument) and these symbols might be common between strategies. What's a good way to implement this in Amibroker? Should I just add the formulas to the different sheets of a chart (for example add formula1 to first sheet, formula2 to second sheet etc)or is there a better way to run and monitor different strategies?
I am not completely sure what you exactly do so I will just discribe what I do that might help you.
I run batch files using the sheduler on a daily basis
I have several databases, but my EOD data is all in 1 database so for the first batch, that runs in the morning, I open the correct database. Then my script is run which writes a csv file that I then load in other programs again (could be directly in your broker software)
I run several batch scripts, all writing their own csv file.
Hope you understand what I do. Might give you enough hints and tips allready to solve your problem. If you want further help with setting up something like that just get in touch. I am not very good in AmiBroker but might be able to help you out if I understand completely what you are looking for.
Hmm so these batch files start executing formula codes as well? Do you manually open amibroker and TWS or do you do that through batch commands as well?
I have TWS running 24 hours a day. It restarts automaticaly and will require you to log in once every 7 day's.
Amibroker always runs but you could have it start up and run a batch at startup.
You will probably need to load the orders manualy into TWS as a basket.... It can definately be automated but I think you will want some user control somewhere....
If you use a single database, the simplest way consists in running your formulas in Scan one by one, and include a little bit of code to send orders to TWS via IBController. Set the Transmit parameter of placeOrder to FALSE. Orders appear in the TWS Classic sheet so you can transmit or discard them after review. As mentioned by Henri, Batch can also be used to automate all operations (loading, running, eventually logging...). You can find many examples of Batch use in this forum.
Ok, I've heard about this. People use scan to execute formulas. And unlike inserting formulas into the chart, the code is only executed one time in the scan. But say I have 20 strategies with 20 different symbols , then this would be error prone and tedious. I am assuming only way to work with different strategies and symbols in the scanner is to select them from the drop down boxes that are above the scanner. Or is there a more automated way to work with the scanner? The other aspect with sending orders ready to transmit via IBController I am aware of it and planning to do it that way.
You just create 20 batch files that run the scan. You can ofcourse also create 1 batch file selecting a different symbol and then strategy which you then execute but it's not that much more work to create 20.
Lot of work to set it up the first time, but once set up, it will run every day without a problem.
Ok, so I need to use batch files to automate. I will look this up.
File - New - Batch
After creation, go to tools - Scheduler and schedule your task
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.