How to plot a call price and a put price in Amibroker

#1
Hi afl experts

I use ODIN data and like to plot both call and put on same chart.
I get a call chart or a put chart.
This helps to see what both are doing at sametime.
actually I wanted a chart of 5700call and 5900 put with relative to nifty index.
the concept is
we see RS of call.
we see RS of put.
we combine both.


thanks and regards
ford
 
#3
hi

Thanks.
when it comes to options,the chart doesnt come easily
option symbols have specific symols name.like
NIFTY25APR2013 5800.00 PE


SEE BELOW CODE SOMETHING WRONG WITH IT.CAN SOMEBODY PLEASE FIX IT!
regards
ford
HTML:
_SECTION_BEGIN("Relative Performance");
//_N( TickerList = ParamStr("Tickers", "^DJI,MSFT,GE") );
_N( TickerList = ParamStr("Tickers", "NIFTY25APR2013 5800.00PE ,NIFTY25APR2013 5700.00CE") );


NumBars = 20;
fvb = Status("firstvisiblebar");
Plot( 100 * ( C - C[ fvb ] ) / C[ fvb ], Name(), colorBlue );
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{
 fc = Foreign( symbol, "C" );

 if( ! IsNull( fc[ 0 ] ) )
 {
   Plot( 100 * ( fc - fc[ fvb ] )/ fc[ fvb ], symbol, colorLightOrange + ( (2*i) % 15 ), styleLine );
 }
}
PlotGrid( 0, colorBlack );
_N( Title = "{{NAME}} - Relative Performance [%]: {{VALUES}}" );
_SECTION_END();
 

Similar threads