General Trading Chat

checkmate7

Well-Known Member
doss ji posted it in varun ji thread

This would give you your histogram and OBV with EMA...Hope this is what you want

Code:
procedure BackgroundSetting()

{


SetChartBkGradientFill( ParamColor("BackgroundTop", colorSkyblue),

        ParamColor("BackgroudBottom", colorWhite),ParamColor("TitleBlock",colorWhite));

}



SetBarsRequired( -2, -2 );

_SECTION_BEGIN("Display Setting");

GraphXSpace = 10;

Backgroundsetting();

_SECTION_END();//Display Setting




//Expansion for clarity:

PathA1= Ref(C,-1)-L;

PathB1= H-L;

PathC1= H-C;

Path1 = PathA1+PathB1+PathC1;

UpShare1 = PathB1;

DnShare1 = PathA1+PathC1;


PathA2= H-Ref(C,-1);

PathB2= H-L;

PathC2= C-L;

Path2 = PathA2+PathB2+PathC2;

UpShare2 = PathA2+PathC2;

DnShare2 = PathB2;


Paths  = IIf(C<Ref(C,-1),Path1,    IIf(C>Ref(C,-1),Path2,   1));

UpShare= IIf(C<Ref(C,-1),UpShare1,IIf(C>Ref(C,-1),UpShare2,0));

DnShare= IIf(C<Ref(C,-1),DnShare1,IIf(C>Ref(C,-1),DnShare2,0));


FlowFactor = Avg;


FlowIn  = UpShare/Paths*Volume*FlowFactor;

FlowOut = DnShare/Paths*Volume*FlowFactor;

NetFlow = FlowIn - FlowOut;

TotalFlow = Cum(NetFlow );



PlotType = ParamList("Type of Chart Plotting:","Cumulative|Time Segmented",1);

LBP = Param("LBP for Time Segmented Plot",36,10,50,1);

FastSmoothMF     = EMA(TotalFlow,int(LBP/2));

SlowSmoothMF   = EMA(TotalFlow,LBP);


DailyNetFlow= IIf(NetFlow==0,MA(Netflow,30),NetFlow);


if(PlotType=="Cumulative")

{

    Plot(TotalFlow ,"Garrett Money Flow",colorRed,styleThick);

}

else if (PlotType=="Time Segmented")

{

    TSMF=FastSmoothMF - SlowSmoothMF;

    Plot(TSMF,"Time Segmented Money Flow",colorRed,styleThick);

    Plot(0,"",colorBlack);

    TSMFsig = EMA(TSMF,9);

    Plot(TSMFsig,"Sig",colorBlue);

 

    Histogram = TSMF-TSMFSig;
col = IIf(Histogram>0,colorGreen,colorRed);

    Plot(Histogram,"Histogram",col,styleHistogram,styleThick);


}
 
Last edited by a moderator:


agaion this is not obv histogram ithink its the same obv shared by monkeybusiness bro but different looking

the middle single line is obv in amibroker , need original obv plus histogram in it ............
Histogram of OBV will not be much useful, anyway its very simple one line code . . . so here goes

Plot(OBV(),"OBV",IIf(OBV()<0,colorRed,colorBlue),styleThick|styleHistogram);


Happy :)
 
When I bought DMart few months ago,I had said that for Dmart, price of Rs 1000 is just a matter of time....today it touched Rs 995 in a market which is undergoing a correction......:)

Smart_trade

Sir,

Do u still hold it in your INVESTMENT portfolio. i remember you quoting you have sold DMART after its Q1 results and re-enter later.(not sure if you were mentioning about swing holding / investment holdings)

You may ignore if you dont wish to reply to this question (since it refers to your portfolio)

thanks
 

Similar threads