Simple Coding Help - No Promise.

vijkris

Learner and Follower
Thanks vijkris, works perfectly... U try it with the filter and let me know.

DM
:lol:
I would like to try but don't remember the first condition actually.:eek:
 

chintan786

Well-Known Member
Code:
Op = MA(O,5);	Hi = MA(H,5);	Lo = MA(L,5);	Cl = MA(C,5);	e = MA(Hi-Lo,5);
PlotOHLC(Op,Hi,Lo,Cl,"",colorDefault,styleCandle);

PK = Ref(Hi,-4) < Ref(Hi,-3) AND  Ref(Hi,-3) < Ref(Hi,-2) AND Ref(Hi,-2) > Ref(Hi,-1) AND Ref(Hi,-1) > Hi;
TR = Ref(Lo,-4) > Ref(Lo,-3) AND  Ref(Lo,-3) > Ref(Lo,-2) AND Ref(Lo,-2) < Ref(Lo,-1) AND Ref(Lo,-1) < Lo;

PlotShapes(PK*2,colorWhite,0,Hi);		
PlotShapes(TR*1,colorWhite,0,Lo);

// THIS NEXT 2 LINES OF CODE LOOKS INTO FUTURE
PlotShapes(Ref(PK,2)*21,colorWhite,0,Hi,12);
PlotShapes(Ref(TR,2)*21,colorWhite,0,Lo);

// BEST TO PLOT THIS ON A SEPERATE PANE
Plot(MA(Hi-Lo,5),"",colorRed,styleOwnScale);
Please do not come up with any more change requests for this code . . . .

Happy :)
Dear Happy SinghJi,
Sorry for late reply. Thanks a ton for this.
May I know where u located.
Warm Regards
Chintan
 
guys any background symbol name afl please share , little transparent if possible

regards
//=====================================================================
//background stock name (works only on Amibroker version 5.00 onwards.
//=====================================================================
_SECTION_BEGIN("Name");
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/6 );
GfxSetTextAlign( 6 );// center alignment
//GfxSetTextColor( ColorRGB( 200, 200, 200 ) );
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
_SECTION_END();

source:wis estoc ktrader vpa afl
 

ocil

Well-Known Member
Hi can any help me understand details about below two lines:-

uptrend= Signal(11)<MACD(11);
downtrend= Signal(11)>MACD(11);

I am non-programmer background. Thanks for your help
 

Similar threads