Zigs&Zags for custom indicator

 

Hello,

does anybody know, if there is a (practical) method to use costum indicators(i.e.the values) in a ZigZag indicator formula?

Example:

In the ZigZag we got for example the code: "Low[iLowest(NULL,0,MODE_LOW,ExtDepth,shift)" based on the close price (of the security)

How can one replace the close price by a custom indicator?

thanks, if anybody has an idea

 
fxnew wrote >>

Hello,

does anybody know, if there is a (practical) method to use costum indicators(i.e.the values) in a ZigZag indicator formula?

Example:

In the ZigZag we got for example the code: "Low[iLowest(NULL,0,MODE_LOW,ExtDepth,shift)" based on the close price (of the security)

How can one replace the close price by a custom indicator?

thanks, if anybody has an idea

Very interesting idea, I don't see why you could not use iCustom.

https://docs.mql4.com/indicators/iCustom

the link will take you to documentation and lists the commonly available functions. There are likely more in Code Base.

Just off the top of my head I suspect that you will need to limit execution to finished bars, i.e. process indicator at the beginning of each new bar.

Perhaps someone a little better at MQl4 code can add to this.

HTH

Keith

Reason: