Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Bull/Bear spread by "marketcalls.in" for Amibroker (AFL)
ashmita
almost 4 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker

Can monitor vslue of Debit/Credit option spreads in Amibroker.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Bear Call and Bear Put Spread");
SetChartOptions(0,chartShowArrows|chartShowDates);




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

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


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

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

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


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

_SECTION_END();

_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

2 comments

1. abhishek7271

hello

how to use this formula ?

should i have to change in Symbols ?

please explain sir

2. ashmita

You can have any symbol on the main chart.
Add this as additional chart on another pane and use any other 2 symbols.
Make sure that you have all the symbols added in your symbol list in Amibroker.

Leave Comment

Please login here to leave a comment.

Back