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

[amibroker] Re: Can you generate an inbuilt study from within AFL?



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> yes if you can define the conditions in the afl where the base line
> starts and finishes
> Cheers
> Graham Kav
<snip>

well that's good to know, but, I've tried for hours to get this
working, but

1) I'm not even able to get the correct all time high/low and date.
Both the lowest/highest and LLV and HHV functions return the correct
values but they seem to give different values if I move the vertical
line cursor in a chart running the AFL. ie it will give me the lowest
and highest up till the vertical line, not for the full history of the
chart. I want this AFL to automatically give the same result
regardless of where I click in a chart, I don't want to have to select
the range (beginning and end values).

2) I can't get the date per se, as the ValueWhen function won't work
with Date(), only DateNum, DateTime etc work, and when I try to
convert the displayed number, it doesn't change the value to a date.
I've searched this group and the one person who asked the same thing
got it working only described what I have tried. 

3) assuming I can get 1 & 2 working how then would you call the Fib
fan and Fib Extension functions with those parameters? Can't find
anything in Help index.

...very frustrated.
Any help would be appreciated.
Here's the test code so far (outputting the values to the title line
for debugging):

SetBarsRequired(10000,10000); 
Lowest_Close = Lowest(Close);
L_date = ValueWhen(Lowest_Close, DateNum(),1);
Lowest_date = DateTimeConvert( 2, L_date);

Highest_Close = Highest(Close); 
//H_Date = ValueWhen( Highest_Close, DateNum(),1);
H_Date = ValueWhen( C==Highest(Close), DateNum(),1);
Highest_date = DateTimeConvert(2, H_Date);

Title = Name() + ": all time low close = " + Lowest_Close +" @ " + 
Lowest_date + " all time High Close= " + Highest_Close +" @ " +
Highest_date ;



------------------------------------

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/