Arbitrage Trading AFL

amitrandive

Well-Known Member
#1
Dear All

Can we plot the price difference between two different month contracts on a single chart?

Say price difference between Nifty Future July and Nifty Future August.

See attached as an example.

A 5 min Crude Oil Chart of price difference between August and September contract.

 

amandeep86

Well-Known Member
#3
Yes Amit ,it could be done using the spread analysis under the basic charts facilities,It provide difference and ratio analysis between the selected contracts.
:thumb::thumb::thumb:
 

ocil

Well-Known Member
#6
any one can use this code also for spread trading. This is not my code:-
_SECTION_BEGIN("Future Spread");
SetChartOptions(0,chartShowArrows|chartShowDates);




_N( Symbol1= ParamStr("Strike1", "IDBI-I") );

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


_N( Symbol2= ParamStr("Strike2", "SAIL-I") );

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

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


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

_SECTION_END();
 

Similar threads