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

[amibroker] Re: Multiple time frames question



PureBytes Links

Trading Reference Links

Lookback=1;
p = (H+L+C)/3;
r1 = (2*p)-L;
s1 = (2*p)-H;
r2 = p +(r1 - s1);
s2 = p -(r2 - s1);
Plot(SelectedValue(HHV(r2,Lookback)),"Moving 
High2",colorYellow,1,1.4);
Plot(SelectedValue(HHV(r1,Lookback)),"Moving 
High1",colorYellow,1,1.4);
Plot(SelectedValue(LLV(s1,Lookback)),"Moving Low1",colorGreen,1,1.4);
Plot(SelectedValue(LLV(s2,Lookback)),"Moving Low2",colorGreen,1,1.4);
/* TimeFrameGetPrice( "O", inWeekly, -1 ) - gives you previous week 
Open price
TimeFrameGetPrice( "C", inWeekly, -3 ) - gives you weekly Close price 
3 weeks ago
TimeFrameGetPrice( "H", inWeekly, -2 ) - gives you weekly High price 
2 weeks ago
TimeFrameGetPrice( "O", inWeekly, 0 ) - gives you this week Open 
price.
TimeFrameGetPrice( "H", inDaily, -1 ) - gives previous Day High when 
working on intraday data */
Wo = TimeFrameGetPrice( "O", inWeekly, -1 );
Wh = TimeFrameGetPrice( "H", inWeekly, -1 );
Wl = TimeFrameGetPrice( "L", inWeekly, -1 );
Wc=TimeFrameGetPrice( "C", inWeekly, -1 );
Wp=(Wo+Wh+Wl+Wc)/4;
Wr1 = (2*Wp)- Wl;
Ws1 = (2*Wp)- Wh;
Wr2 = Wp + (Wr1 - Ws1);
Ws2 = Wp - (Wr2 - Ws1);
Plot(SelectedValue(HHV(Wr2,Lookback)),"Moving 
WHigh2",colorOrange,1,1.4);
Plot(SelectedValue(HHV(Wr1,Lookback)),"Moving 
WHigh1",colorOrange,1,1.4);
Plot(SelectedValue(LLV(Ws1,Lookback)),"Moving Low1",colorBlue,1,1.4);
Plot(SelectedValue(LLV(Ws2,Lookback)),"Moving Low2",colorBlue,1,1.4);

rgds, Pal


--- In amibroker@xxxxxxxxxxxxxxx, "epintoem" <epintoem@xxxx> wrote:
> I can plot the daily pivots using AVG, 2*avg-L, and 2*avg-h.
> how would I plot the same on a daily chart for the week
> 
> I should have a straight line for the following week/month based on 
> the H,L and C of the prev week/month.
> wc=TimeFrameCompress(C,inWeekly);
> wh=TimeFrameCompress(H,inWeekly);
> wl=TimeFrameCompress(L,inWeekly);
> 
> Plotting this using the above gives me some wierd plots....
> 
> Thanks for your help


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

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/