PT3 C# - referencing indicator values from another indicator
Hi ,
I have a query with regards to coding in PT3 using C#.
Scenario -
Chart 1- EURUSD
Indicator md
chart 2 - GBPUSD
indicator md
chart 3 - USDJPY
indicator md
explanation -
3 different charts with the same indicator ('md') loaded on each of the charts.
where,
-indicator md is an indicator coded in C# for the PT3 platform.
-each instance of indicator md has 2 variables VA and VB, used to output/'setvalue' for 2 lines on the md indicator.
What I would like to do -
create a new indicator (sum md) on a different chart that gets values of VA and VB from the 3 respective charts i.e. EURUSD, GBPUSD and USDJPY.
And do some calculations and output the result on the new indicator sum md.
example -
sum md line 1 = VA(from EURUSD) + VA(from GBPUSD) + VA(from USDJPY)
sum md line 2 = VB(from EURUSD) + VB(from GBPUSD) + VB(from USDJPY)
sum md line 3 = (sum md line 1 - sum md line 2)
In the above case what would the syntax/code be for getting the values of the variables VA and VB from the 'md' indicators on the different charts (3 of them ) and into the new indicator 'sum md' ?
Would appreciate any help for this query or a PT3 C# example that shows how this can be done.
I thought I would add this too -
Each instance of the indicator 'md' uses price and size values from 5 levels of market depth on the respective chart.
Hence the idea was to get the values from the existing indicators accessing market depth (i.e. md) rather than to create a new indicator that would access the market depth information of 3-6 different symbols simultaneously.
Which would be a tremendous cpu and bandwith hog