Roanoke VA
Posts: 1 since Apr 2015
Thanks Given: 0
Thanks Received: 0
|
Hello,
I have the indicator below (VBal) I am using to calculate the uptick vs downtick balance for the NQ.
Vup=IIf(C>Ref(C,-1),V,0);
Vdown=IIf(C<Ref(C,-1),V*-1,0);
Vs=IIf(C==Ref(C,-1),1,0);
VupSame=IIf(C==Ref(C,-1) AND Ref(Vup,-(BarsSince(Vs==0)))>0,V,0);
VdownSame=IIf(C==Ref(C,-1) AND Ref(Vdown,-(BarsSince(Vs==0)))<0,V*-1,0);
VBal=IIf(Day()==Ref(Day(),-1),Sum(Vup,BarsSince(Day()!=Ref(Day(),-1)))+Sum(Vdown,BarsSince(Day()!=Ref(Day(),-1)))+Sum(VupSame,BarsSince(Day()!=Ref(Day(),-1)))+Sum(VdownSame,BarsSince(Day()!=Ref(Day(),-1))),V);
Can someone help me with how to plot this custom indicator as an OHLC chart in amibroker? Is there a way to use the addcomposite function to set the O,H,L,C values and plotforeign?
Thanks,
Mark
|