Your chart is at broker server time, use TimeCurrent() not TimeLocal().
The ange!
it's work with this change, to get the info of previous 2 min candle i need to take last 2 candle:
datetime thisTime = TimeCurrent(); CopyHigh( Symbol(), PERIOD_M2, thisTime, 2, <-- i have to request the last two candle if i want the previous candle highPriceArray );
then info about prev candle:
Print("high: ",highPriceArray[1],"low: ",lowPriceArray[1]);
instead if i want the info about current candle:
Print("high: ",highPriceArray[0],"low: ",lowPriceArray[0]);
right?
andream1977:
The ange!
it's work with this change, to get the info of previous 2 min candle i need to take last 2 candle:
then info about prev candle:
instead if i want the info about current candle:
right?
Only if your arrays are indexed as series :
ArraySetAsSeries(highPriceArray,true); ArraySetAsSeries(lowPriceArray,true);
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi
i dont understand how to find the high and the low of the last 2 minute candle
i use this code:
my code, print price different from the price of my mt5 chart, where is my error?