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

[amibroker] Highest Since Mystery



PureBytes Links

Trading Reference Links

Hi,

I calculating pyramid points at fixed atr intervals above the close 
from the buy point

Buy = Close > MA(Close,30);
Sell = Close < MA(Close,30);

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

DollarsAboveEntry = Max(Close - ValueWhen(Buy,Close,1),0);
AtrsAboveEntry = int(DollarsAboveEntry /ATR(10));
NumAtrsAboveEntry = HighestSince(Buy,int(DollarsAboveEntry /ATR(10)),1);

Plot(DollarsAboveEntry,"DollarsAboveEntry",colorRed,styleLine);
Plot
(ATRsAboveEntry,"ATRsAboveEntry",colorBlue,styleLine+styleStaircase);
Plot
(NumAtrsAboveEntry,"NumAtrsAboveEntry",colorGreen,styleLine+styleOwnScal
e+styleStaircase);

GraphXSpace = 10;
Plot(Close,"",colorBlack,styleCandle);

shape = Sell * shapeDownArrow + Buy * shapeUpArrow; 
shapeColor = IIf(Buy,colorGreen,IIf(Sell,colorRed,0));
PlotShapes(shape,shapecolor,3,IIf( Buy , Low, High ),-20 );

I can't explain why NumAtrsAboveEntry is null until the second buy 
point - except it does have a value at the first buy point. 

All the other arrays are non null and so plot fine.

I can't explain this. Mystified. 

It can be confirmed by copying the above code into the the formula 
editor and clicking apply.

Any help appreciated.

Geoff

 




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/