Hide Zigzag indicator if line chart is active

 

Hey guys,

I permanently use the Zigzag indicator in my template. But when I switch to the line chart I want to hide the Zigzag indicator.

I thought about checking the CHART_MODE within the Zigzag code and if the line chart is active I wanted to set the visibility to invisible or visible on the monthly only. But I have no idea how to do this even within the original code.

Does anyone have an idea how to do this? Is it actually possible?

 

Marbo:

have no idea how to do this even within the original code.

Does anyone have an idea how to do this?

Is it actually possible?

    1. MT4: Learn to code it.
      MT5: Begin learning to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
    2. or pay (Freelance) someone to code it.
                Hiring to write script - General - MQL5 programming forum

  1. You already answered this.
  2. Of course.
 
William Roeder:
    1. MT4: Learn to code it.
      MT5: Begin learning to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
    2. or pay (Freelance) someone to code it.
                Hiring to write script - General - MQL5 programming forum

  1. You already answered this.
  2. Of course.

Thank you very much for your kind and warm response. Always a pleasure. :)

We had lots of conversations here, so you could know that I code. Not comparable to you but if you gave me a short advice/a keyword how I can solve my problem I could try to code it.

 
Marbo:

Thank you very much for your kind and warm response. Always a pleasure. :)

We had lots of conversations here, so you could know that I code. Not comparable to you but if you gave me a short advice/a keyword how I can solve my problem I could try to code it.

Such a nice answer deserves a reward.

Files:
 
Alain Verleyen:

Such a nice answer deserves a reward.

Wow... absolutely fantastic!

Thank you very much!!!

 
Marbo:

Wow... absolutely fantastic!

Thank you very much!!!

I just saw how you did this. I never knew that I can change/modify the indicator styles within the OnCalculate(). I always thought this can only be used  in the OnInit().

This opens a new world for me! Now I know how to change indicators without using the regular option-windows! Awesome!!! :)

 
Marbo:

I just saw how you did this. I never knew that I can change/modify the indicator styles within the OnCalculate(). I always thought this can only be used  in the OnInit().

This opens a new world for me! Now I know how to change indicators without using the regular option-windows! Awesome!!! :)

You are welcome.
Reason: