I've been trying to code my EA to trade multiple symbols and multiple timeframes and have reached a point where i do not know how to proceed, it complies just fine but i know it's not how it should be done, should i use 3d arrays ? and how so ? How do i get the ChartOpen() to distinguish which symbol and tmeframe to trade ?
Bad method is to target the selected symbols in the symbols window.
I recommend: decide on the necessary symbols and only then build the logic of the robot.
Bad method is to target the selected symbols in the symbols window.
I recommend: decide on the necessary symbols and only then build the logic of the robot.
I've selected only the symbols i need and deleted the rest from the symbols windows, so there are only 10 symbols at max
I've selected only the symbols i need and deleted the rest from the symbols windows, so there are only 10 symbols at max
Oh, like that? Then that's good.
Now describe what exactly do you need from these ten characters? And why do you need the 'ChartOpen' command?
Oh, like that? Then that's good.
Now describe what exactly do you need from these ten characters? And why do you need the 'ChartOpen' command?
an array can be used to copy bar info and indicator handles and so on, but 10 symbols across 10 timeframes would be 100 charts, each with its unique info, how do i get it so that i can copy buffers without actually creating each individual symbol and timeframe, use a 3d array ? confused at this point. The ChartOpen() i use to manually inspect the strategy one last time before opening a buy or sell order, The ChartOpen() is in place of buy and sell.
So say the EA meets all the conditions on GBPUSD on M3 chart, how do i code the EA to figure out which symbol and which timeframe has my strategy and then send that to the ChartOpen() ?
Thanks in advance
an array can be used to copy bar info and indicator handles and so on, but 10 symbols across 10 timeframes would be 100 charts, each with its unique info, how do i get it so that i can copy buffers without actually creating each individual symbol and timeframe, use a 3d array ? confused at this point. The ChartOpen() i use to manually inspect the strategy one last time before opening a buy or sell order , The ChartOpen() is in place of buy and sell.
So say the EA meets all the conditions on GBPUSD on M3 chart, how do i code the EA to figure out which symbol and which timeframe has my strategy and then send that to the ChartOpen() ?
Thanks in advance
To send a trade order, you DO NOT need to open a chart - an Expert Advisor using the CTrade library can open a position for any symbol.
To send a trade order, you DO NOT need to open a chart - an Expert Advisor using the CTrade library can open a position for any symbol.
i know that and that's what i chose to do, what i meant is that there is some bit that i would like to visually confirm than just coding the logic for it, kind of like a semi-automatic expert advisor, it'll send trade signals and openchart which meets with my rules, i confirm and then open trade. So getting the multi symbol and multi timeframe part is what im struggling with
i know that and that's what i chose to do, what i meant is that there is some bit that i would like to visually confirm than just coding the logic for it, kind of like a semi-automatic expert advisor, it'll send trade signals and openchart which meets with my rules, i confirm and then open trade. So getting the multi symbol and multi timeframe part is what im struggling with
You probably need the following: let's say you are analyzing 5 symbols and 5 timeframes - that means you need to open 5 * 5 = 25 charts. You need to attach a panel advisor to each chart. After that, you manually view all 25 charts. If any chart satisfies you, you simply press the "BUY" or "SELL" button on the panel advisor.
Did I understand you correctly?
You probably need the following: let's say you are analyzing 5 symbols and 5 timeframes - that means you need to open 5 * 5 = 25 charts. You need to attach a panel advisor to each chart. After that, you manually view all 25 charts. If any chart satisfies you, you simply press the "BUY" or "SELL" button on the panel advisor.
Did I understand you correctly?
No, that just would end up eating a lot of memory and will start lagging.
i need the EA to be attached on a single chart and monitor multiple charts and timeframes, and the the condition is met open the chart with the ChartOpen()
No, that just would end up eating a lot of memory and will start lagging.
i need the EA to be attached on a single chart and monitor multiple charts and timeframes, and the the condition is met open the chart with the ChartOpen()
Sorry, We're going in circles. I got out of the discussion.
I've been trying to code my EA to trade multiple symbols and multiple timeframes and have reached a point where i do not know how to proceed, it complies just fine but i know it's not how it should be done, should i use 3d arrays ? and how so ? How do i get the ChartOpen() to distinguish which symbol and tmeframe to trade ?
I suggest you watch the following video that explains a good method of building a multi-symbol EA:
1.1) Why you REALLY need to start using Multi-Symbol Expert Advisors in MetaTrader 5 - YouTube- 2020.06.08
- www.youtube.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've been trying to code my EA to trade multiple symbols and multiple timeframes and have reached a point where i do not know how to proceed, it complies just fine but i know it's not how it should be done, should i use 3d arrays ? and how so ? How do i get the ChartOpen() to distinguish which symbol and tmeframe to trade ?