The number of days is parsed until the point where I put the Print(). If I move it below LineH, LineL the variable LineTFBars does not return 31 but 0.
- That's not a problem that's a want.
- Where you show the Print is when the boolean is true. But you are posting about when it is false. Makes no sense.
- LineTFBars is a variable, it doesn't return anything. Your code doesn't parse anything. Moving a print statement changes nothing. Makes no sense.
-
On MT4: Unless the current chart is that specific pair/TF referenced (LineTFselected or PERIOD_D1,) you must handle 4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
- That's not a problem that's a want.
- Where you show the Print is when the boolean is true. But you are posting about when it is false. Makes no sense.
- LineTFBars is a variable, it doesn't return anything. Your code doesn't parse anything. Moving a print statement changes nothing. Makes no sense.
-
On MT4: Unless the current chart is that specific pair/TF referenced (LineTFselected or PERIOD_D1,) you must handle 4066/4073 errors.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
1. The problem I want to solve.
2. As I wrote.. I put the Print there because this is the line I have identified where the variable does not return 31 anymore. Not in the "ture" nor in the "false" area.
3. Probably parse was the wrong word.
4. I don't quite get the code. Which parts do I have to adjust?
I did implement your code and changed the PERIOD_M15 in the function within OnCalculate to PERIOD_D1 but that didnt help and gave me an erro Failed:0 and not showing my indicator anymore.
Also I don't understand why I can hardcode 31 into iHighest but the variable does not work. Can you give an explanation?
Hello I hope someone can help me find an "error" in this function.
The Problem: I want to calculate the high of the last 31 daily candles if Line4CandleHL == false.
The number of days is returned until the point where I put the Print(). If I move it below LineH, LineL the variable LineTFBars does not return 31 but 0.
I have tried all I could think of but just can't find the mistake. I hope someone can help.
iHighest
iHighest
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello I hope someone can help me find an "error" in this function.
The Problem: I want to calculate the high of the last 31 daily candles if Line4CandleHL == false.
The number of days is returned until the point where I put the Print(). If I move it below LineH, LineL the variable LineTFBars does not return 31 but 0.
I have tried all I could think of but just can't find the mistake. I hope someone can help.