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

[amibroker] Intraday data importing from myFile.txt (fwd)



PureBytes Links

Trading Reference Links

Yuki,
many thanks for the valuable comments.
[this list is the best T/A newspaper IMO]
How could we, the poor T/analysts, know all this ?
Back to the subject now.
Note also that, for the N100 market, we have 12 [!!] recent invH&S, 9 
of them have already crossed the neckline and 2 of them have already 
reach the target and go higher.
[For the N100 I use percentage=5% to define the significant 
peaks&troughs] 
One year ago you should need a quality magnifier to discover one or 
two examples in a month !!
If we use perc=3%, as I use for the Nikkei study, then we have for 
the last Jan16 bar
invH&S 17/100 [!!]
bullish neckline breakouts 11/100
achieved target 4/100
As you see, the N100 market gives more alternatives for this formation
Here is an exploration I use [for the n=1 last quotations]

// H&S Exploration
per = 5;//calibrate the percentage here
x = Cum(1);
back=100;
inter=200;
s11=H;s12=L;
/* H & S */
pR = PeakBars( s11, per, 1 ) == 0;
endt1= LastValue(ValueWhen( pR, x, 1 ));
medt1=LastValue(ValueWhen( pR, x, 2 ));
startt1=LastValue(ValueWhen( pR, x, 3 ));
dt1=endt1-startt1;
C1=x==endt1 OR x==medt1 OR x==startt1;
endR = LastValue(ValueWhen( pR, s11, 1 ) );
medR=LastValue(ValueWhen( pR, s11, 2 ) );
startR = LastValue( ValueWhen( pR, s11, 3  ));
Filter1=medR>endR AND medR>startR AND abs(startR-endR)<0.02*
(startR+endR) AND
dt1<inter AND endt1>LastValue(x)-back;
MaxGraph=10;Graph1=C;Graph1Style=64;GraphXSpace=5;
/*H&S Neck Line*/
Aper=medt1-startt1;bper=endt1-medt1;
La=  LastValue(ValueWhen(x==medt1,LLV(L,Aper)));
Lb=LastValue(ValueWhen(x==-1+endt1,LLV(L,bper)));
Fa=L==La AND x>startt1 AND x<medt1;
Fb=L==Lb AND x>medt1 AND x<endt1;
endt= LastValue(ValueWhen( Fb, x ));
startt=LastValue(ValueWhen( Fa, x ));
dtS =endt-startt;endS = Lb;startS = La;
aS = (endS-startS)/dtS;bS = endS;
trendlineS = aS * ( x  -endt ) + bS; 
Graph3 = IIf(Filter1 AND x>startt-5,trendlineS,-
1e10);Graph3BarColor=7;
/*Inverted H & S*/
tpR = TroughBars( s12, per, 1 ) == 0;
tendt1=LastValue(ValueWhen(tpr,x,1));
tmedt1=LastValue(ValueWhen(tpr,x,2));
tstartt1=LastValue(ValueWhen(tpr,x,3));
tdt1=tendt1-tstartt1;
C2=x==tendt1 OR x==tmedt1 OR x==tstartt1;
tendR = LastValue(ValueWhen( tpR, s12, 1 ) );
tmedR=LastValue(ValueWhen( tpR, s12, 2 ) );
tstartR = LastValue( ValueWhen( tpR, s12, 3  ));
Filter2=tmedR<tendR AND tmedR<tstartR AND
abs(tstartR-tendR)<0.02*(tstartR+tendR) AND tdt1<inter AND
tendt1>LastValue(x)-back;
/*Inverted H&S Neck Line*/
tAper=tmedt1-tstartt1;tbper=tendt1-tmedt1;
Ha=  LastValue(ValueWhen(x==tmedt1,HHV(H,tAper)));
Hb=LastValue(ValueWhen(x==-1+tendt1,HHV(H,tbper)));
tFa=H==Ha AND x>tstartt1 AND x<tmedt1;
tFb=H==Hb AND x>tmedt1 AND x<tendt1;
Rendt= LastValue(ValueWhen(tFb, x ));
Rstartt=LastValue(ValueWhen( tFa, x ));
Rdt =Rendt-Rstartt;endR = Hb;startR = Ha;
aR = (endR-startR)/Rdt;bR = endR;
trendlineR = aR * ( x  -Rendt ) + bR; 
Graph4 = IIf(Filter2 AND x>Rstartt-5,trendlineR,-
1e10);Graph4BarColor=10;
g3=Graph3;
g4=Graph4;
upcr=filter2 AND Cross(C,trendlineR) AND x>tendt1;
dncr=filter1 AND Cross(trendlineS,C) AND x>endt1;
/*H&S target*/
diff1=ValueWhen(x==medt1,C-trendlineS);
target1=trendlineS-diff1;
Graph5=IIf(filter1 AND x>endt1,target1,-1e10);
Graph5Style=8;Graph5BarColor=7;
/*Inverted H&S target*/
diff2=ValueWhen(x==tmedt1,trendlineR-C);
target2=trendlineR+diff2;
Graph6=IIf(Filter2 AND x>tendt1,target2,-
1e10);Graph6Style=8;Graph6BarColor=10;
Graph1BarColor=IIf(C1 AND Filter1,7,IIf(C2 AND Filter2,10,IIf
(upcr,4,IIf(dncr,4,1))));
/*Exploration*/
PER=LastValue(Cum(1))-ENDT1;
HSa=BarsSince(Cross(target1,C))>0 AND BarsSince(Cross(target1,C))
<LastValue(Cum(1))-endt1;
HSa=Sum(Cross(target1,C),PER)>=1  AND BarsSince(Cross(target1,C))
<LastValue(Cum(1))-endt1;
HSb=Sum(Cross(C,target2),PER)>=1 AND BarsSince(Cross(C,target2))
<LastValue(Cum(1))-tendt1;
Filter=Filter1 OR Filter2;// explore for the n=1 last quotations
AddColumn(Filter1,"H&S",1.0);
AddColumn(C<TRENDLINES,"BEARISH BREAKOUT",1.0);
AddColumn(Filter1*TARGET1,"H&S TARGET");//AddColumn
(Filter1*HSA,"");AddColumn(BarsSince(Cross(TARGET1,C)),"");
AddTextColumn(WriteIf(filter1*HSa,"achieved",""),"Achieved");
AddColumn(Filter2,"INV H&S",1.0);
AddColumn(C>TRENDLINER,"BULLISH BREAKOUT",1.0);
AddColumn(Filter2*TARGET2,"INV H&S TARGET");
AddTextColumn(WriteIf(filter2*HSb,"achieved",""),"Achieved");

The code is not perfect, someday I have to arrange some details, but, 
until then, it is not that bad.
GENZ example is fascinating and quite descriptive for the recent 
period : Two simultaneous H&S and invH&S and [I hope today] an ideal 
target cross of the invH&S.

Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
> Hi DIMITRIS,
> 
> Tuesday, January 20, 2004, 6:43:05 PM, you wrote:
> 
> DT> Yuki, I will post later today a nice code to see H&S of the past
> DT> [not only the recent one]. BTW, do you agree with Hiroaki
> DT> Kuramochi  comment at
> DT> http://biz.yahoo.com/rf/040119/markets_japan_stocks_12.html
> 
> Well, there has to be a "reason", doesn't there.  ^^_^^
> 
> Yes, and no.  The only reason the BoJ is doing this, the absolute
> only reason, is to give the MoF (no, not a dirty word, but Ministry
> of Finance) more freedom to intervene in the currency market.  There
> is hardly any liquidity problem here, as banks can't or won't lend
> the money they have anyway.  The only liquidity problem is that of
> keeping the printing presses cooled sufficiently as they print out
> reams and reams of 10,000 yen notes to offer in exchange for 
dollars.
> 
> I think printing press manufacturers are certainly a 'buy', because
> the MoF must be wearing them out weekly.  ^^_^^
> 
> All this intervention is 'unsterilized' too, I'm told.  (For those
> few who probably don't know: Unsterilized means they leave the money
> they use to buy dollars in the system, rather than mopping it up 3 
or
> 4 days later, to avoid dramatically increasing the money supply,
> which is the normal central bank action -- most CBs that intervene
> come right in a few days later and absorb back the funds.) So there
> is no liquidity crisis, shortage, or even a hint of anything that
> would require the BoJ to increase the float -- *other* than the MoF
> buying dollars as if they were made out of gold.
> 
> Of course, both the extreme liquidity and the determination to peg
> the yen to the dollar are somewhat bullish for the market.  All that
> money needs a home, and there is really no "productive" place for it
> right now, other than speculation.  And this tends to put a halt to
> deflation, which everyone here would love to see.  And if they can
> hold the yen steady, all those Toyotas, Hondas and Nissans sold in
> N.A. get dollars repatriated to Japan that are worth more in yen.  
So
> P&Ls look better.
> 
> Yuki


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 

------------------------ 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/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Yahoo! Groups Links

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

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/