How can I check if the current candle is higher (position) than the previous one, I mean only the two current ones?
Code:
//+------------------------------------------------------------------+ //| 1.mq5 | //| Copyright © 2020, Vladimir Karputov | //+------------------------------------------------------------------+ #property copyright "Copyright © 2020, Vladimir Karputov" #property version "1.000" //--- //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- return (INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { MqlRates rates[]; ArraySetAsSeries(rates,true); int start_pos=0,count=3; if(CopyRates(Symbol(),Period(),start_pos,count,rates)!=count) return; //--- if(rates[0].high>rates[1].high) { //--- the 'High' price of bar # 0 is higher than the High price of bar # 1 } //--- } //+------------------------------------------------------------------+
Ok, and tell me how to check when the first dot appears on the SAR indicator?
- 2020.08.26
- www.mql5.com
Ok thank you for fast answer :)
hm and how can i protect my code in MQL5 beforing copy? ( hide source code)
Ok thank you for fast answer :)
hm and how can i protect my code in MQL5 beforing copy? ( hide source code)
My advice: you have nothing to hide - you are still young and green :)
My advice: you have nothing to hide - you are still young and green :)
And how can i detect only new spike bars and how can i measuring the position of the spike candles only?
I do not understand. Don't use slang expressions.
I do not understand. Don't use slang expressions.
Ok :)
How detect only this white bars and then
Ok :)
How detect only this white bars and then
Work with MqlRates structure and compare the Open price and Close price.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use