Apply to Indicator on 1-min chart and make sure the start of the day shows because it is the sampling reference:
DN = DateNum();
TN=TimeNum();
Newday = DN > Ref(DN,-1);
SampleTime = SelectedValue(TN); // Provide your own TimeNum
SampleTrigger=TN==SampleTime;
SampleHigh = ValueWhen(SampleTrigger,HighestSince(NewDay,H));
SampleLow = ValueWhen(SampleTrigger,LowestSince(NewDay,L));
Plot(C,"",1,128);
Plot(NewDay,"",7,styleArea|styleOwnScale|styleNoLabel,0,1);
Plot(SampleTrigger,"",4,styleArea|styleOwnScale|styleNoLabel,0,1);
Plot(SampleHigh,"",5,styleStaircase);
Plot(SampleLow,"",4,styleStaircase);
Plot((SampleHigh+SampleLow)/2,"",2,styleStaircase);
Good luck,
herman
Saturday, May 26, 2007, 5:32:21 PM, you wrote:
> Hi - I would like to plot the current day's middle price, starting
> from 13:00 each day. So at 13:00, the indicator "starts" and plots:
> (current high value since 13:00 today + current low value since 13:00
> today) / 2
> I have intraday data on a 1min timescale.
> Thanks!
> Please note that this group is for discussion between users only.
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
> <*> To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
> <*> Your email settings:
> Individual Email | Traditional
> <*> To change settings online go to:
> http://groups.yahoo.com/group/amibroker/join
> (Yahoo! ID required)
> <*> To change settings via email:
> mailto:amibroker-digest@xxxxxxxxxxxxxxx
> mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
> <*> 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/
>
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
__,_._,___
|