[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 92

 
Good evening all. Please advise how to properly attach and write the filter - if thef4 AO green, then buy. and vice versa if thef4 AO red, then sell. thanks in advance.
 
isaev-av:
Good evening all. Please advise how to properly attach and write the filter - if thef4 AO green, then buy. and vice versa if thef4 AO red, then sell. thanks in advance.
 bool Buy=false, Sell=false;
 
 double AO  = iAO(NULL, PERIOD_H4, 1);
 double pAO = iAO(NULL, PERIOD_H4, 2);
 
 if(AO>pAO) Buy=true;
 if(AO<pAO) Sell=true;
 
 if(Buy && ваши условия) OrderSend(...OP_BUY....);
 if(Sell && ваши условия)OrderSend(...OP_SELL...);
 
coronel:


Thank you

 
Good evening. Please advise how to make the EA stop working (place new orders) on certain days of the month by date. (Thank you)
 

Hi all, could you please tell me how to make the EA sell only on the basis of the closing prices of hourly candles? I have the impression that it sells on the basis of 15-minute candles. I am puzzled by the behavior of price on the candlestick 2010.10.15. 02:00. Why does the EA sell? It is not clear, because the code says to consider the 3rd and 5th candle from the zero position? Here is the code:

MA_1_t = iMA(NULL, 60, Period_MA_1, 0, MODE_LWMA, PRICE_CLOSE, 2); // тут шифт 2, чтобы советник продавал только // после закрытия 3-й от 0-ой свечи, а полу-
MA_2_t = iMA(NULL, 60, Period_MA_1, 0, MODE_LWMA, PRICE_CLOSE, 4); // чается, что только цена кольнула МА, то он // сразу же продает.

if (MA_2_t < Bid && MA_1_t > Bid) { // условия, возможно, в этом собака порылась
Opn_S = true;
Cls_B = true;
}

 

Good evening. Can you please tell me how to know the Ask price for GBPUSD if my Expert Advisor is on EURUSD?

Thank you in advance.

 
LeRus:

Good evening. Can you please tell me how to know the Ask price for GBPUSD if my Expert Advisor is on EURUSD?

Thank you in advance.

double AskGBPUSD = MarketInfo(GBPUSD, MODE_ASK);
 
I forgot to say that I'm testing on the Euros.
 

Please HOW to close an order correctly in parts at different times and once? I've been struggling for days...

https://www.mql5.com/ru/forum/131277/page69

 
100yan:

Please, HOW is it correct to close an order in parts at different times and once?

i assume the keyword is "once" ?

Please describe your problem in detail.

Reason: