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

[amibroker] Re: Help - SQRT and Peak won't play nice



PureBytes Links

Trading Reference Links

Dimitri,

I think ... that there is in the dlls collection a zigzag function 
based on High Low and it must accept variable percentage.
I remember That I have backtested a swing trading with a variable 
percentage I must check it...and tell you.

stephane 


> Jayson,
> I do not like the idea to save the code just for the code and 
create 
> a formula quite strange in application [imagine the user who will 
> trade it !!]
> Since Peak() and related functions do not accept variable 
percentage, 
> we just donīt use variable percentage and thatīs all. The use of 
> Lastvalue(C) *does not introduce* variable perc in Peak() function 
> and can not be considered as a solution, partial or final.
> The only way is to follow the analytic Peak() code procedure, see 
if 
> it is possible to introduce variable perc and use the probable 
result 
> as a new function.
> It is not always easy. I did it for the RSI of MACD before the 
built-
> in RSIA because I knew all the analytic steps. I could not say 
> something similar for Peak() function. I exposed an idea in my 
> Variable % peak just to have a first taste of this variable % and 
its 
> probable application. Of course, this sample is far from the 
analytic 
> Peak() procedure.
> Solving a code trouble is not the same with writing a correct code, 
> ie a code to answer the question.
> May be, someday, built-in Peak() accepts variable %. Before this, 
Peak
> () function should work with negative arrays, it is more important 
> IMO. [You can not apply Peak() to an MACD() array for example].
> Dimitris Tsokakis
> PS I donīt remember if Peak() was included in the vote list...
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> > Dimitris,
> > True enough but since the indicator will not accept the array 
> of "C" do you
> > see a better alternative using closing data?
> > 
> > Jayson
> > -----Original Message-----
> > From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> > Sent: Thursday, May 01, 2003 4:20 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Help - SQRT and Peak won't play nice
> > 
> > 
> > Jayson,
> > Lastvalue(C) will give a fixed % for all the previous history.
> > Tomorrow, another Lastvalue(C)will give another fixed % and all 
the
> > previous history will change. This will give a peak recognition 
> valid
> > for only one day.
> > DT
> > --- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> > > Chris,
> > > try lastvalue(c)   as just c will produce a variable number
> > >
> > > Jayson
> > > -----Original Message-----
> > > From: cby [mailto:cby1@x...]
> > > Sent: Thursday, May 01, 2003 12:41 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Help - SQRT and Peak won't play nice
> > >
> > >
> > > Hi. Maybe someone can tell me why the following does not work 
(bad
> > > args error on second line):
> > >
> > > percdiff = (((0.17 * sqrt(Close)) / Close) * 100);
> > > PK = Peak( H, percdiff, 1 ) == High;
> > >
> > > And this does work (actual number rather than Close):
> > >
> > > percdiff = (((0.17 * sqrt(4.5)) / 4.5) * 100);
> > > PK = Peak( H, percdiff, 1 ) == High;
> > >
> > > I'm sure it'll be something really dumb :-(.
> > >
> > > Thanks,
> > > Chris
> > >
> > >
> > >
> > >
> > >       Yahoo! Groups Sponsor
> > >
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
> Service.
> > 
> > 
> >       Yahoo! Groups Sponsor
> > 
> > 
> > 
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > 
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/cjB9SD/od7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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