Possible to get the buffer values from another indicator on the chart

 

Hi,

is it possible for my indicator to get the buffer value from another indicator which is placed on the chart?

I don't want to call it with iCustom(...) because the parameter for this indicator is unknown or can be changed in the meantime.

I only want to get the values I can see in the data window.

 
sunshineh: is it possible for my indicator to get the buffer value from another indicator which is placed on the chart? I don't want to call it with iCustom(...) because the parameter for this indicator is unknown or can be changed in the meantime.I only want to get the values I can see in the data window.
  1. Yes, it is possible.
  2. Use ChartIndicatorGet and CopyBuffer.
  3. Also look at ...

ChartID

Returns the ID of the current chart

ChartIndicatorGet

Returns the handle of the indicator with the specified short name in the specified chart window

ChartIndicatorName

Returns the short name of the indicator by the number in the indicators list on the specified chart window

ChartIndicatorsTotal

Returns the number of all indicators applied to the specified chart window.


By the way, I have never used these. How do I know of them? I simply searched the documentation.

When you have a query, try to search the documentation for the answer. It will be quicker than asking on the forum.

 

Hi Fernando,

lot's of thanks for your help! I have read the documentation first and also found the first part with ChartIndicatorName ... But I haven seen the CopyBuffer Command. So, thank you very much. I will try it right now!

 
I am using mql4 not mql5, I can't find the CopyBuffer Command here. I thinks this way works only with MT5 :-(
 
sunshineh #: lot's of thanks for your help! I have read the documentation first and also found the first part with ChartIndicatorName ... But I haven seen the CopyBuffer Command. So, thank you very much. I will try it right now!

How can you know about iCustom() but not CopyBuffer()?

Is your question perhaps about MQL4 and not MQL5?

If so, then you posted in the wrong section and none of what I have referenced will work on MQL4.

 
sunshineh #: I am using mql4 not mql5, I can't find the CopyBuffer Command here. I thinks this way works only with MT5 :-(

You posted in the wrong section. You have been on this forum long enough to know that the MQL4 section is at the end of the forum. Please post in the correct section next time.

There is no solution for MQL4 for your query. It is only available on MQL5.

 
OK, thank you!
 
sunshineh #: I am using mql4 not mql5, I can't find the CopyBuffer Command here. I thinks this way works only with MT5 :-(
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. There is no CopyBuffer, only iCustom. What you want is not possible.
 
sunshineh:

Hi,

is it possible for my indicator to get the buffer value from another indicator which is placed on the chart?

I don't want to call it with iCustom(...) because the parameter for this indicator is unknown or can be changed in the meantime.

I only want to get the values I can see in the data window.

1403 rating points and you are still not able to post on the right section ! Wasting people time.

The next time you will be banned, seriously.

Reason: