moscow
Experience: Intermediate
Platform: AmiBroker
Posts: 4 since Feb 2010
Thanks Given: 2
Thanks Received: 0
|
Hi,
I've created the indicator to show how many bars close was > MA
But the problem is I don't know how to start my calculation at 9:30. I see some bars that cross the MA yesterday and I get on my first intraday some value. But I want to have 1 if first bar close is > MA regardless yesterday's bars
Could you help to update it
input length = 12;
input price = close;
def BarsPerDay = 78;
def ma = MovingAverage(AverageType.SIMPLE, price, length);
plot UpBars = fold hh = 1 to BarsPerDay while close[hh] > ma[hh] do hh;
|