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

RE: [amibroker] sectioning off premarket and post market on a real-time chart...



PureBytes Links

Trading Reference Links

Thank you Herman...will do.

-----Original Message-----
From: Herman van den Bergen [mailto:psytek@xxxxxxxx]
Sent: Saturday, September 18, 2004 14:59
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] sectioning off premarket and post market on a
real-time chart...


You can play with the code below...
herman

// RT Time references
StartOfDay = DateNum() != Ref(DateNum(),-1);
EndOfDay = (DateNum() != Ref(DateNum(),1)) OR (BarIndex() == (BarCount-1));
DaysOpenBar=Cross(TimeNum(),093000);
DaysCloseBar=Cross(TimeNum(),160000);
PreHours = TimeNum() < 093000;
AfterHours = TimeNum() > 160000;
NormalHours = NOT (PreHours OR AfterHours);
// Significant Prices
DaysFirstPrice = ValueWhen(StartOfDay, Open);
DaysOpenPrice = TimeFrameGetPrice("O",inDaily);
DaysLastPrice = ValueWhen(EndOfDay, Close);
DaysClosePrice = TimeFrameGetPrice("C",inDaily);
PreHourChange = DaysOpenPrice - DaysFirstPrice;
AfterHoursChange = DaysLastPrice - DaysClosePrice;
DayChange = DaysClosePrice - DaysOpenPrice;

Plot(C,"C",1,128);
//Plot(DaysFirstPrice,"DaysFirstPrice",5,1);
//Plot(DaysLastPrice ,"DaysLastPrice ",4,1);
//Plot(DaysOpenPrice ,"DaysOpenPrice ",6,1);
//Plot(DaysClosePrice ,"DaysClosePrice ",7,1);
Plot(EndOfDay,"",4,2|styleOwnScale,0,1);
Plot(StartOfDay,"",5,2|styleOwnScale,0,1);
Plot(DaysOpenBar,"",6,2|styleOwnScale,0,1);
Plot(DaysCloseBar,"",7,2|styleOwnScale,0,1);
Plot(PreHours ,"",6,2|styleOwnScale|styleArea,0,1);
Plot(NormalHours ,"",7,2|styleOwnScale|styleArea,0,1);
Plot(AfterHours ,"",9,2|styleOwnScale|styleArea,0,1);
-----Original Message-----
From: Nurudin Kaba [mailto:n.kaba@xxxxxxxxxx]
Sent: Saturday, September 18, 2004 2:13 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] sectioning off premarket and post market on a real-time
chart...


I would like to collect RT data, but would like to have the time from 16:30
eastern time to 09:30 sectioned off in a different background color.  Can
someone help me code this?  Much appreciated!

Thanks,
Nurudin




Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Yahoo! Groups Sponsor
ADVERTISEMENT






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.





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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:
    http://docs.yahoo.com/info/terms/