Displaying Current Indicator Value in Comments

 

Trying to get the current value for iAO indicator and send it to the Comment area on screen while running in Expert Advisor. I want to do this as a confirmation during coding practice so that I can see what my calculations on those values are actually doing in real time. First I need to know how to get the current iAO value so I can comment it to the screen.

Can anyone help me to get started please.


Cheers


Mike

 
MikeFleming:

Trying to get the current value for iAO indicator and send it to the Comment area on screen while running in Expert Advisor. I want to do this as a confirmation during coding practice so that I can see what my calculations on those values are actually doing in real time. First I need to know how to get the current iAO value so I can comment it to the screen.

Can anyone help me to get started please.


Cheers


Mike

Example: how to get the value of the 'iAO' indicator in an advisor 

How to start with MQL5
How to start with MQL5
  • 2020.09.06
  • www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
 

Hi Vladimir, Wow that was fast and exactly what I need right now to get started on my programming journey, thank you

Cheers

Mike

 

Hi Vladimir,

I would like to compare return values for the iStochastic indicator and place them in the comments area in my Expert Advisor screen. This I can do thanks to one of your threads demonstrating this procedure. My needs are to be able to compare the returned values from one time period with that of a different time period from the same indicator. I seem to be close to getting a result but I am not able to see how to achieve this dual operation.

Do you have a small piece of code example which could teach me how to get K,D and Slowing return values for 2 different time periods of the same iStochastic indicator. I want to use the cross over values from the different time periods as feedback for making a decision later in my code.

Looking forward to hearing from you in the future.

Kind regards

Mike

 
MikeFleming :

Hi Vladimir,

I would like to compare return values for the iStochastic indicator and place them in the comments area in my Expert Advisor screen. This I can do thanks to one of your threads demonstrating this procedure. My needs are to be able to compare the returned values from one time period with that of a different time period from the same indicator. I seem to be close to getting a result but I am not able to see how to achieve this dual operation.

Do you have a small piece of code example which could teach me how to get K,D and Slowing return values for 2 different time periods of the same iStochastic indicator. I want to use the cross over values from the different time periods as feedback for making a decision later in my code.

Looking forward to hearing from you in the future.

Kind regards

Mike

You need to create two handles. And then copy the values from the two indicators.

 
MikeFleming :

Hi Vladimir,

I would like to compare return values for the iStochastic indicator and place them in the comments area in my Expert Advisor screen. This I can do thanks to one of your threads demonstrating this procedure. My needs are to be able to compare the returned values from one time period with that of a different time period from the same indicator. I seem to be close to getting a result but I am not able to see how to achieve this dual operation.

Do you have a small piece of code example which could teach me how to get K,D and Slowing return values for 2 different time periods of the same iStochastic indicator. I want to use the cross over values from the different time periods as feedback for making a decision later in my code.

Looking forward to hearing from you in the future.

Kind regards

Mike

Today I will post an indicator - it allows you to receive Stochastic data from another timeframe.

Example: Stochastic on the current timeframe and on another (D1) ( Stochastic Other TimeFrame )


Reason: