M1 chart missing bars - page 3

 

Ok, I will correct it.

PS I am only a week into EA programming, still making mistakes

 

What about the functionality of the code?

What is the reason?

 
DmitriyN:
And in the tester it may not always be, because you have strict conditions like Minute()==bM3 . And if there is no such bar? In real life or on demo, the connection can easily be lost.
Check the checkboxes here: Top menu/Service/Settings/Advisors.


How can I repeat the request to open an order, for example, if there is no bar 8 34 and open it at 8 35....?
 

By the way..,

...The problem is the lack of quotes on M1, I tried to update (download) the quotes archive from MT4, but nothing downloaded. There are only quotes for this month, or rather there were, I downloaded the archive from another site, it failed to install and deleted the history without saving, now I can not test the advisor at all. Although it says in the base quotes 4mil.s +om ... advise what to do!

I wrote the question to the support ... tell me about the quotes

says in the log

2012.06.27 21:50:05 There were 0 passes done during optimization

2012.06.27 21:50:05 TestGenerator: no history data 'EURUSD1'

 
Still, please help with the code to make it work for real....
 

2. Check the leverage in the tester and in the real/demo, if the leverage in the tester is 500 and in the real is 100, the free margin may not be enough to open a trade.

3. Insert after OrderSend(); Print(GetLastError()) line;

Look at the log to see what error is occurring, and then use this as a jumping-off point. When debugging the Expert Advisor, insert this line in doubtful places, you can erase or comment it later.
 

No check yet((( shit, I messed up with the quotes, I wanted to update the base and all the quotes disappeared in the tester, it says ...((((

2012.06.27 21:50:05 There were 0 passes done during optimization

2012.06.27 21:50:05 TestGenerator: no history data 'EURUSD1'

 
rulabs:

2. Look at the leverage in the tester and in the real/demo, if the leverage in the tester is 500 and in the real 100, the free margin may not be enough to open a trade.

3. Insert after OrderSend(); Print(GetLastError()) line;

Check the log to see what kind of error you get, and use that as a jumping-off point. When debugging the EA, insert this line in questionable places, you can erase or comment it out later.


How do you know in the Strategy Tester which leverage is which?

PS on the real account 1 : 500

 

Simplified to the extreme. Set your time to a minute longer than the server's. And run it:

int start()
  {
   if ((OrdersTotal()==0 && Hour()==21) && (Minute()==2))
      {     
      OrderSend(Symbol(),OP_SELL,0.1,Bid,0,Ask+100*Point,Ask-100*Point,"DLSexp",123,0);
      }  
  } 

Does this code open your orders at all?

It works for me.

 

Install Metatrader from Alpari, test on it and trade with your broker. It is the only one with five digits, keep in mind.

Service-settings- EURUSD M1 quote archive, close, restart the terminal.

Service-Settings=Graphs, fill both input fields to the maximum of 1000000000000000000, I don't remember how much fits in there.