Strangle option charts Amibroker ?

cloudTrader

Well-Known Member
#2
I want to combine 2 strike option prices and show it on one chart. Please help me
This will be helpful.

Code:
_SECTION_BEGIN("Strangle and Straddle Spread");
SetChartOptions(0,chartShowArrows|chartShowDates);

_N( Symbol1= ParamStr("Strike1", "BANKNIFTY26APR24900CE") );

SetForeign( Symbol1 );
C1 = C;
H1 = H;
L1 = L;
O1 = O;
V1 = V;
RestorePriceArrays();


_N( Symbol2= ParamStr("Strike2", "BANKNIFTY26APR24900PE") );

SetForeign( Symbol2 );
C2 = C;
H2 = H;
L2 = L;
O2 = O;
V2 = V;
RestorePriceArrays();

Color = ParamColor( "Color", colorDefault );
Style = ParamStyle( "Style", styleLine, maskPrice );


PlotOHLC( O1+O2, H1+H2, L1+L2, C1+C2, "(" + Symbol1+" + "+Symbol2 + ") spread", Color, style );

_SECTION_END();
 

mmca2006

Active Member
#6
This will be helpful.

Code:
_SECTION_BEGIN("Strangle and Straddle Spread");
SetChartOptions(0,chartShowArrows|chartShowDates);

_N( Symbol1= ParamStr("Strike1", "BANKNIFTY26APR24900CE") );

SetForeign( Symbol1 );
C1 = C;
H1 = H;
L1 = L;
O1 = O;
V1 = V;
RestorePriceArrays();


_N( Symbol2= ParamStr("Strike2", "BANKNIFTY26APR24900PE") );

SetForeign( Symbol2 );
C2 = C;
H2 = H;
L2 = L;
O2 = O;
V2 = V;
RestorePriceArrays();

Color = ParamColor( "Color", colorDefault );
Style = ParamStyle( "Style", styleLine, maskPrice );


PlotOHLC( O1+O2, H1+H2, L1+L2, C1+C2, "(" + Symbol1+" + "+Symbol2 + ") spread", Color, style );

_SECTION_END();
Is it possible to convert this straddle chart from line to PNF format. It will be great help, pls.
 
#7
This will be helpful.

Code:
_SECTION_BEGIN("Strangle and Straddle Spread");
SetChartOptions(0,chartShowArrows|chartShowDates);

_N( Symbol1= ParamStr("Strike1", "BANKNIFTY26APR24900CE") );

SetForeign( Symbol1 );
C1 = C;
H1 = H;
L1 = L;
O1 = O;
V1 = V;
RestorePriceArrays();


_N( Symbol2= ParamStr("Strike2", "BANKNIFTY26APR24900PE") );

SetForeign( Symbol2 );
C2 = C;
H2 = H;
L2 = L;
O2 = O;
V2 = V;
RestorePriceArrays();

Color = ParamColor( "Color", colorDefault );
Style = ParamStyle( "Style", styleLine, maskPrice );


PlotOHLC( O1+O2, H1+H2, L1+L2, C1+C2, "(" + Symbol1+" + "+Symbol2 + ") spread", Color, style );

_SECTION_END();

How to cahnge different symbols
 

Similar threads