Sunteți pe pagina 1din 2

_SECTION_BEGIN("PSO Premier Stoch");

_N(Title = StrFormat(FullName() +" - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,


Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C,
SelectedValue( ROC( C, 1 )) ));

StochLen = Param("Stoch Len", 8, 3, 30 );


Period = Param("Smooth Period", 21, 5, 100 );
SK = StochK( StochLen, 1 );
Len = sqrt( Period );
NormStochK = 0.1 * ( SK - 50 );
SmoothStoch = EMA( EMA( NormStochK, Len ), Len );
expSS = exp( SmoothStoch );
Premier = ( expSS - 1 )/( expSS + 1 );
Plot( Premier, "Premier", colorYellow, styleThick );
Plot( Premier, "", IIf( Premier < 0, colorRed, colorBlue ), styleHistogram );
Plot( 0.2, "", colorBlue );
Plot( 0.9, "", colorBlue );
Plot( -0.2, "", colorRed );
Plot( -0.9, "", colorRed );
Plot(0,"",colorCustom12);
Short = Cross( Premier, -0.9 ) OR Cross( Premier, -0.2 );
Buy = Cross( 0.9, Premier ) OR Cross( 0.2, Premier );
Sell = Cover = 0;
ApplyStop( stopTypeLoss, stopModePoint, 8, True ); // 8 big point = $800 Loss
ApplyStop( stopTypeProfit, stopModePoint, 16, True );
PointValue = 100; // big point value
SetPositionSize( 1, spsShares ); // 1 contract per trade
SetBacktestMode( backtestRegularRawMulti ); // allow multiple positions
SetTradeDelays( 1, 1, 1, 1 );
_SECTION_END();

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( gMA(dEMA( Premier,3),2 ), "EMA1", ParamColor( "Color", colorRed ),
ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, vkunisetty@yahoo.com//
FS=Param("Font Size",20,20,100,1);
GfxSelectFont("Arial", FS, 900, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorYellow) );
//Hor=Param("Horizontal Position",800,800,800,800);

Hor=Param("Horizontal Position",20,20,500,20);

Ver=Param("Vertical Position",50,50,250,50);
GfxTextOut(""+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
_SECTION_END();
TL =DEMA (HMA( (HHV( H, 4) + LLV( L, 4) )/2,3),4);
SL =hma( ( HHV( H, 13 ) + LLV( L, 13) )/2,3);
DL = Ref( C/2+TL/2, 13 );
Plot(SL,"SL",colorRed,styleThick|styleDots|styleLeftAxisScale); // standard, base,
or kijun-sen line

Plot(DL,"DL",colorWhite,styleLine|styleThick|styleDots|styleLeftAxisScale); //
delayed, lagging, or chikou span

S-ar putea să vă placă și