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

Re: [amibroker] Re: indicator calculations and chart display



PureBytes Links

Trading Reference Links


Hey Ara,
 
Why not do this for your S/R levels since they are based on daily close anyway?  Hopefully will save you some work as I finished these earlier this week.
 

//PIVOT LEVELS
TimeFrameSet(inDaily);
P = (H+L+C) /3;
R1 = 2*P - L;
RM1 = (P + R1) /2;
S1 = 2*P - H;
SM1 = ((P- S1)/2) + S1;
R2 = (P - S1) + R1;
RM2 = (R1 + R2) / 2;
S2 = P - (R1 - S1);
SM2 = ( (S1 - S2) / 2 ) + S2;
DC = C;
DH = H;
DL = L;
TimeFrameRestore();
Plot(TimeFrameExpand(DC,inDaily),"Close Day",colorCustom13,styleDots+styleLine+styleNoRescale);
Plot(TimeFrameExpand(DH,inDaily),"High Day",colorBlue,styleLine+styleNoRescale);
Plot(TimeFrameExpand(DL,inDaily),"Low Day",colorBlue,styleLine+styleNoRescale);
Plot(TimeFrameExpand(P,inDaily),"Pivot Level",colorYellow,styleLine+styleNoRescale);
Plot(TimeFrameExpand(R1,inDaily),"R1",colorAqua,styleLine+styleNoRescale);
Plot(TimeFrameExpand(RM1,inDaily),"M1+",colorWhite,styleLine+styleNoRescale);
Plot(TimeFrameExpand(S1,inDaily),"S1",colorAqua,styleLine+styleNoRescale);
Plot(TimeFrameExpand(SM1,inDaily),"M1-",colorWhite,styleLine+styleNoRescale);
Plot(TimeFrameExpand(R2,inDaily),"R2",colorAqua,styleLine+styleNoRescale);
Plot(TimeFrameExpand(RM2,inDaily),"M2+",colorWhite,styleLine+styleNoRescale);
Plot(TimeFrameExpand(S2,inDaily),"S2",colorAqua,styleLine+styleNoRescale);
Plot(TimeFrameExpand(SM2,inDaily),"M2-",colorWhite,styleLine+styleNoRescale);
 
//COMMENTARY
"COLOR LEGEND FOR PIVOT LEVELS";
"YELLOW = PIVOT LEVEL";
"AQUA = S/R LEVELS";
"WHITE = MID-LEVELS";
"BLUE = HIGH/LOW DAY";
"PURPLE = CLOSE DAY";Ara Kaloustian <ara1@xxxxxxxxxx> wrote:
Jay,if you are trying to create S/R levels from overnight data, and show tradinghours only, you need to compute your parameters once in the morning from 24hr data and save them in an ATC. The you can change your preferences anddisplay trading hours only.You would use the saved data to draw the S/R lines.If this is your application, I am working on the same thing ... will be donein a couple of days.----- Original Message ----- From: <jaykwok@xxxxxxxxxxx>To: <amibroker@xxxxxxxxxxxxxxx>Sent: Wednesday, December 17, 2003 9:16 PMSubject: [amibroker] Re: indicator calculations and chart display> Thanks for the quick reply, Graham.>> I'm looking at a 24 hour market like the emini S&P.  I only want to> see the day session but want my indicators to be calculated based
 on> the entire 24 hour session.>> I know I can filter out bars through File - Database but then my> indicators would only be calculated on day session data.>> --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:> > What market are you trading?> > To just display part of the day if in intraday then use the File -> Database> > settings - intraday settings - filter pre/after hours, and set the> market> > hours.> > As far as the indicators excluding the out of session quotes you> would need> > to set a time for this.> > Eg> > C = iif( timenum()>=090000 and timenum()<=163000, C, Null);> >> > I am not certain if the indicator will include the out of session> bars in> > its period, but maybe if this is something you want to permanently> do, then> > remove the unwanted
 data. Eg export the quotes that you want to a> csv file> > and import back to new database would be one way.> > Or maybe something similar to the above for C> > emac = iif( timenum()>=090000 and timenum()<=163000, EMA(c,5),> Null);> >> >> >> > Cheers,> > Graham> > http://groups.msn.com/asxsharetrading> > http://groups.msn.com/fmsaustralia> >> > -----Original Message-----> > From: jaykwok@xxxx [mailto:jaykwok@xxxx]> > Sent: Thursday, 18 December 2003 12:48 PM> > To: amibroker@xxxxxxxxxxxxxxx> > Subject: [amibroker] indicator calculations and chart display> >> >> > Hi,> >> > How would I only display the "day session" on my charts but have> >
 indicators (eg ema(c,50)) based on the 24 hour session?> >> > Thanks,> >> > J> >> >> > 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> >> > ------------------------ 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/>>> 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 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:>  <A
 href="">http://docs.yahoo.com/info/terms/>>Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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 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 the Yahoo! Terms of Service. 
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing


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 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 the Yahoo! Terms of Service.