-
How To Ask Questions The Smart Way. (2004)
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
-
datetime today = iTime(ativo, PERIOD_D1, 0); int pbars = iBarShift(ativo, PERIOD_CURRENT, today) + 0; double hp = iHigh(ativo, PERIOD_CURRENT, pbars); double lp = iLow(ativo, PERIOD_CURRENT, pbars); double mi = (hp + lp)/2.0;
You are moving the lines to the H/L/mid of the first bar (current timeframe) of the day. They will never move after that.
-
Perhaps you meant the highest high/the lowest low of the day; which you can get from the D1 bar zero H/L.
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - MQL4 programming forum - Page 3 #26.4 (2019)On MT5: Unless the current chart is that specific pair/TF, you must synchronize the terminal Data from the Server before accessing candle/indicator values.
Error 4806 while using CopyBuffer() - Expert Advisors and Automated Trading - MQL5 programming forum #10 (2020)
Is it mystical?! It is! - Withdraw - Technical Indicators - MQL5 programming forum (2019)
Timeseries and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
Synchronize Server Data with Terminal Data - Symbols - General - MQL5 programming forum #2 (2018)
SymbolInfoInteger doesn't work - Symbols - General - MQL5 programming forum (2019) -
Why are you using OnTimer? Nothing has changed, nothing needs to update until a new tick arrives.
-
How To Ask Questions The Smart Way. (2004)
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.It is almost always your code.
-
You are moving the lines to the H/L/mid of the first bar of the day. They will never move after that.
- Perhaps you meant the highest high/the lowest low of the day; which you can get from the D1 bar zero H/L.
William, i have tried this code before and it move the lines to the open of the bar on OnInit as expected, and after it I expected it will move to the high, low and middle point of the bar. The problem is that the three objects stay on the open of the bar. Do you have a suggest to fix?
William, i have tried this code before and it move the lines to the open of the bar on OnInit as expected, and after it I expected it will move to the high, low and middle point of the bar. The problem is that the three objects stay on the open of the bar. Do you have a suggest to fix?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The follow expert do not move the lines... how to report a bug to metaquotes? HLineCreate and HLineMove has been based on the documentation page of OBJ_HLINE. Metatrader version is from april 4 2023.