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

[amibroker] Subject: Re: TJ - Solution please



PureBytes Links

Trading Reference Links

As you see, it is better to describe your exact preference first and 
then try the exact code [if any].
You should know something in advance : The p2 is known to be a p2 as 
soon as p1 is recognised as p1 !!
You will have, for example, the last 10 candles neutral and then, 
with the new data import, all of a sudden, yesterday will become a p1 
and 6 bars ago will become a p2!!
You define the properties of the past, when you detect a p1 and this 
is done in reverse time order.
In other words, the event p1 looks into the future by one bar, but 
the event p2 looks into the future by many bars.
Among the others, think the alternative, to define first p2 and then 
expect a lower peak p1. This detection would look into the future by 
only one day , which is not bad at all.
The decision is yours, of course...
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> wrote:
> Thanks for this... We are close but not quite.
> 
> Every peak will have a peak that is higher than it. so we might 
have 
> a situation where a higher peak might be the point for two peaks 
> subsequent peaks that are lower.
> 
> Assume p1 is the the most recent peak at 10.50 on 9./04
> 
> p2 could be a peak with a value of 10.00 on 8/26
> 
> P3 could be the peak with a value of 13.00 on 7/25 that would 
connect 
> to both p1 and P2
> 
> Thanks so much for your help
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Dimitris Tsokakis" 
<TSOKAKIS@xxxx> 
> wrote:
> > Here is my definition of a peak
> > High greater than high previous day and following day. Most 
recent 
> > high greater than close two days earlier.
> > 
> > 
> > condP=Ref(H,-1)>Ref(H,-2) AND Ref(H,-1)>H AND Ref(H,-1)>Ref(C,-3);
> > 
> > The conditions for the peak prior to this one are the same except 
> > that the high should be greater than the peak it is connecting to.
> > 
> > It was Dimitris who provided me the code for IB.
> > 
> > Hope this helps 
> > 
> > ********************************************************
> > 
> > If I understand well, you search for pairs P1, P2.
> > The green candles are all the CONDP occurrences.
> > The red triangles P1 have the previous peak higher.
> > The blue triangles have the next peak lower.
> > The rest green candles are of no interest.
> > Do you want now to link P2, P1 pair with a line, like the dotted 
> black line of the gif ?
> > Or you want a zig line connecting cascade P1,P2,P1,P2,... ?
> > Please advise.
> > 
> > CONDP=Ref(H,-1)>Ref(H,-2) AND Ref(H,-1)>H AND Ref(H,-1)>Ref(C,-3);
> > P11=Ref(CONDP,1);
> > H1=ValueWhen(P11,H,1);
> > H2=ValueWhen(P11,H,2);
> > H0=ValueWhen(P11,H,0);
> > P1=P11 AND H2>H1;
> > P2=P11 AND H1>H0;
> > PlotShapes(shapeUpTriangle*P1,colorRed);
> > PlotShapes(shapeDownTriangle*P2,colorBlue);
> > Plot(C,"",p11*colorYellow+1,64);
> > 
> > Please advise.
> > Dimitris Tsokakis


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