Range Bar Chart in Multi Chart Layout

Hi Experts,

I am working on Indian Options Markets Where we have CE and PE for same Strike prices.

Ex...

NIFTY19500C1 ---> This Symbol Denotes CE Option of the Strike 19500
NIFTY19500P1 ---> This is the respective PE Symbol for the Strike 19500.

I Have a Multi-Chart Setup Where if I select the CE Symbol the other charts will show the repective PE symbols , with the help of the below AFL and Symbolic Link Option.

The Challenge i face is When i Select the Range Bar , Mr.Tomas has already replied that and i understood,
Why am I posting here ?
Because is there any other way through AFL
Or
Any other Way
To Achive this.

Afl Below

_SECTION_BEGIN( " Options Chart - Dual Chart" );
EnableTextOutput( False );
SetChartOptions( 0, chartShowDates | chartShowArrows | chartWrapTitle | chartHideQuoteMarker );

isceLines = isceGraph = ParamToggle( "Show CE Candles", "Off|On", 1 );
ispeLines = ispeGraph = ParamToggle( "Show PE Candles", "Off|On", 1 );

Title = "";

isCEPE = StrRight( Name(), 2 );

if( isCEPE == "C1" )
    fname = "P1";
else
    fname = "C1";

fname = pename = StrTrim( StrLeft( Name(), 14 ) + fname, "", 3 ); // String Functions to get the PE Symnol Name for the Same Strike Price.

f_open = Foreign( fname, "O" );
f_close = Foreign( fname, "C" );

if( isceGraph == 1 ) // Show Only CE Options Chart
{
    SetBarFillColor( colorDarkGreen );
    Plot( C, "", colorDarkGreen, styleCandle , 0, 0, 0, 0, 1 );
    strikeprice=Title = Name();
    
}

if( ispeGraph == 1 ) // Show Only PE Options Chart
{
    Title = pename;
    SetBarFillColor( colorDarkRed );
    PlotForeign( pename, pename, colorDarkRed, styleCandle );
    strikeprice=pename;
}


GfxSetZOrder( -2 );

GfxSetTextColor( ColorRGB( 30, 30, 30 ) );
GfxSelectFont( "Courier New", 25, 800 );
GfxTextOut( strikeprice + " " + Interval(2)+ " ", Status( "pxchartwidth" ) / 4.6, Status( "pxcharttop" ) / 0.1 );


GfxSetZOrder( 0 );

_SECTION_END();









YouTube Video , where i have shown this

Thanks in Advance

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.