Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1507
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is there any way to determine the number of open charts?
Fixed it to 100.
If you need to find one thing, then return after finding it, so you don't have to keep running the loop
Corrected to 100.
If you need to find one thing, then after you have found it, return, so you don't have to keep running the loop
I need to run the loop on every tick, so I made it like this
what if two "something-ones" are open?
why not keep racing?
I need to run a loop on every tick
maybe think of doing something withCHARTEVENT_CUSTOM.
maybe think of doing something withCHARTEVENT_CUSTOM somehow.
Not an option...need to check it without my involvement.
The code above seems to work correctly, but since I'm a weak programmer, I wanted to see the opinion of more experienced and knowledgeable people.
...long wait until Monday to test it (
So the programme can listen to the airwaves without your involvement too, no?
I need to run a loop on every tick, so I did it this way
You don't need to pull crap from help, write an obvious loop... you'll have to live with it later :-)
for(long chartId=ChartNext(0);chartId>0 &&!IsStopped();chartId=ChartNext(chartId)) {
if (ChartSymbol(chartId)=="") continue;
DoChart(chartId);
}
I haven't studied the question, but I think you can assign an event to each chart and then wait for it in OnChartevent...
Alexei, to be honest, with my knowledge it sounds scary...
I need to keep it simple, find an object to buy-buy, find an object to sell-sell.