Comment on Pi - Overview and Feedback

dp0012 commented on 28 Oct 2014, 08:16 PM

Hi Nitin can we have spread price chart in PI. I have amibroker code for same. Pls find below the 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();

View the full comment thread »