OrdersTotal() work on 2 or more Charts by opening trades - page 4

 
andrew:
I honestly believe variations of 
Comment "hello world" ;
is THE best way to start, if you're  newish to programming. Learn about StringFind StringSubstr etc.. throw in dates, then use the date, say, with OnTick() to create a text clock on the chart, display closing/low/high price for the chart, then for other symbols, timeframes etc etc etc 



I appreciate it Andrew i will do that
 
Jack Buda:
I've watched Jim's videos on YouTube & MQL4 Tutorial videos, I started this year (Jan 2019) to learn on how to code MQL4. I can say I've made a lot of mistakes too. What confuses me the most is that most forum's or videos use (i,SELECT_BY_POS,MODE_TRADES) meaning the "i" the int index uses for opening orders or closing orders from my understanding. When i use it i don't see any errors on the journal tab or experts tab. I'm not saying you guys are wrong either. It would be better if you show me how you would have written it then.
January this year I started December last year. By February I did my first Freelance Job and got 5 stars for u. After 2 months. 


So no errors means what.  
 
Jefferson Metha:
January this year I started December last year. By February I did my first Freelance Job and got 5 stars for u. After 2 months. 


So no errors means what.  
That's nice bro. By no errors i mean on the journals tab & Experts Tab on MT4 i don't receive any errors , when using the while loop for opening trades
 
Jim dandy explains how to use OrderSelect in detail. 

OrderSelect(i, SELECT_BY_POS) 
you said u saw this now what's the difference btn

Ur (Loop,~~
And your 
(3000, POS~~~  


THIS MY LAST COMMENT IF U HAD MQL4 BOOK AND READ 1 PAGE PER DAY FROM February to today u should be finished by now. 
 
Jefferson Metha:
Jim dandy explains how to use OrderSelect in detail. 

OrderSelect(i, SELECT_BY_POS) 
you said u saw this now what's the difference btn

Ur (Loop,~~
And your 
(3000, POS~~~  


THIS MY LAST COMMENT IF U HAD MQL4 BOOK AND READ 1 PAGE PER DAY FROM February to today u should be finished by now. 
Thank you Jefferson for your help , i will do that
 
Keith Watford:

No - you don't want the loop variables at all, nor the while

and you definitely don't want to use the variable here.

for(int i=OrdersTotal()-1;i>=0;i--)
   {
    if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

Fixed it

 
Jefferson Metha #: THIS MY LAST COMMENT IF U HAD MQL4 BOOK AND READ 1 PAGE PER DAY FROM February to today u should be finished by now. 

This is an international English forum; post in English on this part of the forums.
          Please don't write ur - it's "you are" or "your" - MQL4 programming forum (2014)

Reason: