Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 505

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 all!
I spent half the night trying to figure out why a simple condition does not work, please help me figure it out:
I am running on historical data, the variables macd1,2, lowprice, highprice are assigned values, but the condition does not want to run, I broke my head can not understand where to dig ... (((
the variables are all double ?
I'll repeat the question - can you please tell me if it's unchecked without the dll?
I'll repeat the question - can you please tell me if it's unchecked without the dll?
No
OnChartEvent() doesn't work in the tester.
Thank you.
All variables are all double ?
Yes all double, it compiles without errors.
Hi all!
I spent half the night trying to figure out why a simple condition does not work, please help me figure it out:
I am running on historical data, the variables macd1,2, lowprice, highprice are assigned values, but the condition does not want to run, I broke my head can not understand where to dig ... (((
First of all, note that you're using zero bar data. This data is not constant (one tick has one data, the next tick has another data).
Secondly, how did you check that the condition is not fulfilled?
Hi all!
I spent half the night trying to figure out why a simple condition does not work, please help me figure it out:
I am running on historical data, the variables macd1,2, lowprice, highprice are assigned values, but the condition does not want to run, I broke my head can not understand where to dig ... (((
iHigh, iLow should be used instead of High, Low
Firstly, note that you are using zero bar data. This data is not constant (one tick is one, the next tick is another).
Secondly, how did you check that the condition is not met?
1. Yes, there is a case for zero bar in the code, no way to check which case I tested now, I will check tonight.
2. I checked it by outputting a comment to a chart with values of values, macd, High and Low have values and min(max)price does not get the corresponding values.
I need to use iHigh, iLow instead of High, Low
Thanks, I will check it in the evening, but I don't understand why Highprice receives a value, but min and max price are still zero?
A complete mess and a misunderstanding of what you are doing...
//--- И далее вообще не понятно к чему у вас фигурные скобки - они висят в пустоте, а это составной оператор, который должен после условия идти. после каждого if стоит всегда открывать фигурную скобку?или чем чревато мое расположение фигурных скобок?