Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 453

 
niktron:
Hello! Please help! How do I find out Open[0] on another symbol (not on the current chart symbol)-Thank you...

https://docs.mql4.com/ru/series/iOpen
 

Thank you very much!
 
Is testing, when the quotes of not the current symbol are involved? My Expert Advisor works on a demo account, but the tester does not open deals, even though I have downloaded the history of all pairs involved ...
 
niktron:
For some reason my EA works on a demo account, but the tester doesn't open trades, even though I downloaded the history of all the pairs involved...

I do not want to open my EA with multicurrency in MT5
 
Profitov:
Question has arisen, is it possible to write an Expert Advisor or script, which would be to achieve for example a 2% loss on the day would close all transactions?
It is possible.
 
Roman.:

you can.
I've got a late ignition...
 
zoritch:

with multicurrency only in the MT5 tester
Zhenya, not really. In the tester you can get and use in calculations data from other, non-testable symbols. You cannot trade on them. Trade functions work only on the symbol on which we are testing. Data from other symbols can be taken.
 
niktron:
For some reason my EA works on a demo account, but the tester does not open deals, although I have downloaded the history of all the pairs involved...
If you try to open a position on a symbol other than the one being tested, you cannot. If you are trying to open a position on a symbol under test, you cannot.
 
artmedia70:
If you try to open a position not on the symbol being tested, you cannot. If it doesn't open on the symbol under test - it's hard to tell you anything without your code.


if(kolpos==0&&Volume[0]<10&&iOpen("EURAUD",PERIOD_M1,1)<iClose("EURAUD",PERIOD_M1,1)&&iOpen("EURUSD",PERIOD_M1,1)>iClose("EURUSD",PERIOD_M1,1)
&&iOpen("USDJPY",PERIOD_M1,1)<iClose("USDJPY",PERIOD_M1,1)&&iOpen("AUDJPY",PERIOD_M1,1)>iClose("AUDJPY",PERIOD_M1,1)&&Open[1]<Close[1])
OrderSend("AUDUSD",OP_BUY,Lot,Ask,slippage,Ask-SL*Point,0,NULL,OrderMagicNumber(),0,Green);
 
niktron:

if(kolpos==0&&Volume[0]<10&&iOpen("EURAUD",PERIOD_M1,1)<iClose("EURAUD",PERIOD_M1,1)&&iOpen("EURUSD",PERIOD_M1,1)>iClose("EURUSD",PERIOD_M1,1)
&&iOpen("USDJPY",PERIOD_M1,1)<iClose("USDJPY",PERIOD_M1,1)&&iOpen("AUDJPY",PERIOD_M1,1)>iClose("AUDJPY",PERIOD_M1,1)&&Open[1]<Close[1])
OrderSend("AUDUSD",OP_BUY,Lot,Ask,slippage,Ask-SL*Point,0,NULL,OrderMagicNumber(),0,Green);
if(kolpos==0 && 
   Volume[0]<10 && 
   iOpen("EURAUD",PERIOD_M1,1)<iClose("EURAUD",PERIOD_M1,1) && 
   iOpen("EURUSD",PERIOD_M1,1)>iClose("EURUSD",PERIOD_M1,1) &&
   iOpen("USDJPY",PERIOD_M1,1)<iClose("USDJPY",PERIOD_M1,1) &&
   iOpen("AUDJPY",PERIOD_M1,1)>iClose("AUDJPY",PERIOD_M1,1) &&
   Open[1]<Close[1])
   OrderSend("AUDUSD",OP_BUY,Lot,Ask,slippage,NormalizeDouble(Bid-SL*Point,Digits),0,NULL,magic,0,Green);

Are you testing it on AUDUSD?

The calculated values of prices in a trade order must be normalised to Digits. Not only that, it should meet the requirements of StopLevel (didn't do it here)

The OrderMagicNumber() is the magic number of the pre-selected order. You must either set it with a specific value, or calculate it in the EA so that it is unique for it.

Prior to that check unprint all values of all conditions that are checked here. Then it will be clear to you where to look.