2 panes with different tickers

I have SPX-IDX ticker on the chart and I need to have two Panes below the chart with the 20 day standard deviations of those vix-idx and vvix tickers. I try but they change in unison and I am not able to make them independent and with vix-idx and vvix fixed to the pane.
Can you tell me where I am failing?
Cheersvix2


Close=PlotForeign( "VIX", " vix" , colorBlack, styleLine|styleOwnScale,0,0,0,0,2) ;

SD20dias=stdev(  Close, 20 );

Plot(SD20dias, "SD20dias", colorBlack, styleLine,0,0,0,0,2);

Plot(0.86,"",colorRed, styleLine );

Close=PlotForeign( "VIX-IDX", " vix" , colorBlack, styleLine|styleOwnScale,0,0,0,0,2) ;

SD20dias=stdev(  Close, 20 );

Plot(SD20dias, "SD20dias", colorBlack, styleLine,0,0,0,0,2);

Plot(1.2,"",colorRed, styleLine );


Using PlotForeign that way is not correct.

You should use Foreign() function instead.

Cl = Foreign( "VIX", "C");

SD20dias=stdev(  Cl , 20 );

Plot(SD20dias, "SD20dias", colorBlack, styleLine,0,0,0,0,2);

PlotGrid(0.86, colorRed, 1, 1, true );

Plot( CL, "Vix", colorBlack, styleLine|styleOwnScale,0,0,0,0,2);

Similar for "VIX-IDX" or "VVIX" or whatever it is of the other incorrect code.
Btw also check whether the symbol names are correct and exist in your DB.

1 Like

Thank you very much for your help.
A greeting

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