[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Programing Question



PureBytes Links

Trading Reference Links


Cordell - I think it does work... check to see if you set AB to paint
trade arrows (rightclick->parametsr->axis&grid)

one hint I would give you woudl be to "break up" your Buy conditions
so that you can easily plot them and debug them individually.

Try this code out:
----------------------------------------
Plot(OBV(), "OBV", 1);

Buy1 = EMA(OBV(),21) > Ref( EMA(OBV(),21), -5 );
Buy2 = Ref( EMA(OBV(),21),-5) > Ref( EMA(OBV(),21), -10);

Buy = Buy1 AND Buy2;

//PlotShapes( shapeHollowSmallDownTriangle * Buy1 +
shapeHollowSmallUpTriangle * Buy2, IIf( Buy1, colorGreen, colorRed ) );
PlotShapes( shapeUpArrow * Buy, IIf( Buy1, colorGreen, colorRed ) );
------------------------------------------



--- In amibroker@xxxxxxxxxxxxxxx, "ct1942" <ct1942@xxxx> wrote:
> 
> I am trying to write an exploration to explore for stocks where the 21
> day MA of OBV is increasing .
> 
> Here's what I've done and it doesn't seem to work.
> 
> Buy=EMA(OBV(),21) > Ref( EMA(OBV(),21), -5 ) AND Ref( EMA(OBV(),21),
> -5) > Ref( EMA(OBV(),21), -10);
> 
> Any help would be appreciated.
> 
> Cordell





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/