Access indicators on the chart within another indicator
Access indicators on the chart within another indicator
12 Aug 2019, 12:52
I want to access indicator values from my chart in another indicator, to display the value or work with it inside the second indicator. Essentially what the Market Snapshot does. But I can't find the API function giving me access to the other indicator results. EG: On the chart below is a Hull-MA and I want to display the value, like I do with the ATR in the top left corner. (The ATR is calculated within the ChartText function, but I would like to avoid doing that for other indicators already on the chart)
Replies
ChrisCz
12 Aug 2019, 16:28
( Updated at: 21 Dec 2023, 09:21 )
Hi Panagiotis,
unfortunatly not really, as the reason I want to access the indicator on the chart is, that I don't want to take care of the indicator values inside the second indicator. Changing the indicator values on the chart gives new indicartor results. If I don't set the second indicator (referencing the one on the chart) to the same changed values, I have different results.
EG: I have a customMA (period 14) on the chart. My Chartvaluesindicator references that customMA and I have to submit the period 14 as I understand it
(_HMA = Indicators.GetIndicator<HullMovingAverage>(Source, 35, 14, 14);
If I now change the values of the HullMovingAverage on my chart, but not the referenced one in the chartvalues indicator, they show different results.
The Market Snapshot is obviously accessing the values of the indicators in the chart area and I would love to know how.
@ChrisCz
PanagiotisCharalampous
12 Aug 2019, 16:29
Hi Christian,
There is no way to access the actual indicators plotted on the chart.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Aug 2019, 17:49
Hi Christian,
No there isn't. You could consider using a file instead.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Aug 2019, 14:22
Hi Christian,
Thanks for posting in our forum, You can find an example of how to call an indicator inside another indicator here. Let me know if this helps.
Best Regards,
Panagiotis
@PanagiotisCharalampous