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

[amibroker] Re: calculating trend line values so as to backtest - AFL help needed



PureBytes Links

Trading Reference Links

It is H greater than previous and following day and the high greater 
than the close 2 days earlier. Maybe the =sign shows something 
different.



--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> condP *does not* define a peak.
> Try the 
> condP=Ref(H,-1)>=Ref(H,-2) AND Ref(H,-1)>H AND Ref(H,-1)>Ref(C,-3);
> Plot(C,"",4*Condp+1,64);
> to see. The painted points are no peaks.
> Perhaps you mean something else.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> wrote:
> > condP=Ref(H,-1)>=Ref(H,-2) AND Ref(H,-1)>H AND Ref(H,-1)>Ref(C,-
3);
> > that is the most recent peak condition
> > the next peak is the defined as
> > condp1= condp and H>most recent peak
> > 
> > Then I need the days between the peaks
> > also the number of days since the most recent peak.
> > 
> > 
> > 
> > In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
> > wrote:
> > > I will try to understand some details:
> > > a.
> > > pcond= mycondition
> > > If pcond is a condition, it will be either 1 or 0. what do you 
> mean 
> > > by "most recent value of pcond"
> > > b.
> > > "the values of the peaks " are ValueWhen( pR, s11), where 
> > > pR = PeakBars( s11, per ) == 0; and are already known
> > > c.
> > > The "bars between them" is barssince(pR).
> > > It would be better to ask your specific question, if it doesn´t 
> > > bother you.
> > > Dimitris Tsokakis
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> 
> wrote:
> > > > Thanks to Dimitris I have the code that automatically draws 
> trend 
> > > > lines but I cannot use that to backtest primarily because it 
> uses 
> > > the 
> > > > last value function or something to that effect.
> > > > 
> > > > Is there a workaround?
> > > > 
> > > > Here is what I am looking for 
> > > > 
> > > > pcond= mycondition
> > > > pcond1= pcond and H>most recent value of pcond
> > > > 
> > > > Using the formula for trend lines I can calculate the value 
of 
> > the 
> > > > line today.
> > > > However, I dont know how to find the values of the peaks and 
> also 
> > > the 
> > > > bars between them. any help would be much appreciated
> > > > 
> > > > TIA


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/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/