I currently stream metatrader 4 data through DDE. Each symbol has its own AFL file and I open up a chart and apply that AFL file for the symbol. I get an alert every time it hits my condition.
I finish with opening up 10 separate windows. I would like to know if there is a way to simplify this and run in a single window. Afterall, the code is the same for each symbol. When I want to change something in the code this needs to be repeated for each symbol which obviously increases the scope for error.
I see that I can run the scan/exploration for a selected interval. Is there a way to let the scan run at the completion of every 5min bar or do I just have to set the interval to be 5min and start the scan precisely at the beginning of the 5min period?
“I finish with opening up 10 separate windows. I would like to know if there is a way to simplify this and run in a single window. Afterall, the code is the same for each symbol. When I want to change something in the code this needs to be repeated for each symbol which obviously increases the scope for error.”
Just a note on this… I add all my code to a library, and then make the call from a shared library - so the code is in 1 spot if I use multiple indicators…
Also, when I ADD my code, I use 'Insert Linked" option - so ALL my code uses the same version and I only change it once and all 10 windows I have opened are updated instantly. Works really well.
That said, I am exploring the Automatic Analysis scan now. I use separate windows because I have programmed buttons to SELL or to turn OFF my automatic trading if I don’t think the system is doing what I want.