sineors please help me to get simple formula

THE LORD

Active Member
#1
if the volume bare >ema(v,10)=1
if the volume bare <ema(v,10)=-1
dosent matter for the bar if its blue or red
i want to calculat in the last 10 dayes how meany bar above ema(v,10) and how meany bare less than ema(v,10)
dosent mateer if the volume is blue or red
i want to know how menay bar volume above ema (v,10) and how meany bar
is less than ema(v,10) in the last 10 dayes
i hope that i can find some answer
thnx to all
 

nac

Well-Known Member
#3
I was suddenly attracted to your title by seeing the first word.

First I thought you're meaning signore (This kinda words really attracts) but actually you're meaning seniors. :rofl: Just the letter 'i' and 'e' exchanged their place.

Don't worry, somebody will drop by and help you with the query. I ain't got any knowledge about this.
 

nac

Well-Known Member
#5
thnx mr-nac fr your kindness also my english is not so good
put im still waiting for some body help:D
uhhh It ain't about your english. It happens to all of us when we type fast. You know one thing, I go back to my post and edit the mistakes I did when I posted it. It happens buddy cool.... :cool:
 

asnavale

Well-Known Member
#10
Hey Lord,

Copy the following code and save as an afl. Apply the afl as an indicator on any chart. The Title will show the number of volume bars which are above and below EMA(V, 10)

// ******************************************

EMAV = EMA(V, 10);
Above = 0;
Below = 0;

if(BarCount > 10)
{
for(i = 1; i <11; i ++)
{
if(V[BarCount - i] > EMAV[BarCount - i]) Above = Above + 1;
if(V[BarCount - i] < EMAV[BarCount - i]) Below = Below + 1;
}
Plot(Above, "Above", colorGreen, styleOwnScale | styleNoDraw | styleNoLabel);
Plot(Below, "Below", colorRed, styleOwnScale | styleNoDraw | styleNoLabel);

}

// ***********************************

Hope this helps

-Anant
 

Similar threads