Hello
I have three questions about an indicator I hope you can help with. Indicator is attached below.
1. I have add a setting to let the user choose if he wants the indicator to draw arrows or not. I add this line: input bool DrawArrowsON = true; //Draw arrows
Then I need to add: if(DrawArrowsOn) { [code for drawing arrows] }
Where should I add this?
2. If user sets alert to true then there is 2 messages in the alert box, it should be only 1. How can I change this? (I have tried to change the NumberofAlerts variable, doesn't make any difference).
3. When I compile the indicator, I get a warning message below Description box: "expression not boolean", and it points to this line: if(bar==1&!flagval2)
What's wrong?
Thank you.
add 1) within the twi ifs, at line 210 and 220 - I guess
add 2) I wont use counter for both buy and sell! I would use newBar and BuyBuffer[1] != BuyBuffer[2] for buy
add 3) I guess (!) that this: if(bar==1&!flagval2) should be if(bar==1 && !flagval2) ?
add 1) within the twi ifs, at line 210 and 220 - I guess
add 2) I wont use counter for both buy and sell! I would use newBar and BuyBuffer[1] != BuyBuffer[2] for buy
add 3) I guess (!) that this: if(bar==1&!flagval2) should be if(bar==1 && !flagval2) ?
Thank you Carl. Will try this. However I don't understand the second answer. Could you clarify further? I don't know much about programming in MQL :) The indicator is not written by me, I have only made small adjustments.
- 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 have three questions about an indicator I hope you can help with. Indicator is attached below.
1. I have add a setting to let the user choose if he wants the indicator to draw arrows or not. I add this line: input bool DrawArrowsON = true; //Draw arrows
Then I need to add: if(DrawArrowsOn) { [code for drawing arrows] }
Where should I add this?
2. If user sets alert to true then there is 2 messages in the alert box, it should be only 1. How can I change this? (I have tried to change the NumberofAlerts variable, doesn't make any difference).
3. When I compile the indicator, I get a warning message below Description box: "expression not boolean", and it points to this line: if(bar==1&!flagval2)
What's wrong?
Thank you.