[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 129

 
orb:
I don't understand...

Do you see the top post? There's a hint of sign errors there (plus and minus). Underlined.
 
if ((l==true)&&(proves==true)){
             if(SL<=MarketInfo(Symbol(),MODE_STOPLEVEL)){SL=MarketInfo(Symbol(),MODE_STOPLEVEL)+1;}
             if(TP<=MarketInfo(Symbol(),MODE_STOPLEVEL)){TP=MarketInfo(Symbol(),MODE_STOPLEVEL)+1;}
             OrderSend(Symbol(),OP_SELL,lot,NormalizeDouble(Bid,Digits),slippage,NormalizeDouble(Ask+SL*Point,Digits),NormalizeDouble(Bid-TP*Point,Digits),0,0,0,Green);
}


if ((l==true)&&(proves==true)){
           if(SL<=MarketInfo(Symbol(),MODE_STOPLEVEL)){SL=MarketInfo(Symbol(),MODE_STOPLEVEL)+1;}
           if(TP<=MarketInfo(Symbol(),MODE_STOPLEVEL)){TP=MarketInfo(Symbol(),MODE_STOPLEVEL)+1;}
           OrderSend(Symbol(),OP_BUY,lot,NormalizeDouble(Ask,Digits),slippage,NormalizeDouble(Bid-SL*Point,Digits),NormalizeDouble(Bid+TP*Point,Digits),0,0,0,Red);
}
 
And what do they teach you at school...
 
FAQ:
And what do they teach you at school...
Well, that happens!) young inexperienced! inattentive, everyone, peace!
 
Roll:

Do you see the top post? There's a hint of sign errors there (plus and minus). Underlined.
Thank you!)
 
Inexperienced is okay, it will pass. inattentiveness is worse, but maybe you just need a break?
 
FAQ:
Inexperienced is okay, it will pass. inattentiveness is worse, but maybe you just need a rest?
That's what I thought too. Thanks again.
 
Hi all, I need your help! I need to get the numerical values of max and min of the MACD indicator window, without fixing them in the "General" section of the indicator setup window. if it is possible, how to get the last max and min on the previous candle? thanks a lot!
 
MK07:
Hi everyone, I need your help! I need to get the numerical values of max and min of the MACD indicator window, without fixing them in the "General" section of the indicator setup window. if it's possible, how to get the last max and min on the previous candlestick?

1. First you need to know how many bars fit in the window https://docs.mql4.com/ru/windows/WindowBarsPerChart.

2. Then you will get the date of the first bar https://docs.mql4.com/ru/windows/WindowFirstVisibleBar

3. Knowing this initial bar and the number of bars - go through these bars and determine the high and low among them

4. profit


Variant 2

https://docs.mql4.com/ru/windows/WindowPriceMax

https://docs.mql4.com/ru/windows/WindowPriceMin

 
FAQ:
No, you can only write and draw in your window, unless of course you use WINAPI, but I don't think that method will work for you


How easy it is! M5 is open and its top a bit sauced and M1 below it shows the comments you want.

As they say, it's always better in the morning! Good morning!