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

[amibroker] Re: Intraday - Open 10 Minute Price Marker



PureBytes Links

Trading Reference Links

The immediate problem is that there CANNOT be a space between ! and = on the failing line. It should be newday = Day() != Ref(Day(), -1);

But lowofday and highofday do not point to yesterday's high and low. You have to use ref(n, -1) to get those values. Try this instead
highofday = Ref(HighestSince(newday, H, 1), -1); 
Lowofday  = Ref(LowestSince(newday, L, 1), -1); 

Also you cannot use a number as the first character of a variable name. 10minuteORhigh is not a valid name. Change that to minute10ORhigh or HighOR10Min or whatever. Just don't have 10 first.

Barry

--- In amibroker@xxxxxxxxxxxxxxx, Ken H <sfehendo@xxx> wrote:
>
> Hi Rajiv
>  
> I keep getting a syntax error on the code as supplied. As my skills are very basic when it comes to coding can you look at what I have put together and suggest possible changes.
>  
> Many thanks
> Ken
>  
> _SECTION_BEGIN("Price");
> TimeFrameSet( in5Minute ); 
> SetChartOptions(0,chartShowArrows|chartShowDates);
> _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
> Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
> if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
> {
> ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
> }
> newday=Day()! = Ref(Day(), -1);
> highofday=HighestSince(newday, H,1);
> Lowofday=LowestSince(newday, L,1);
> Rangeofday=highofda y-lowofday;
> importanttime= 94000;
> 10minuteORhigh= ValueWhen( Cross(TimeNum( ),94000), highofday, 1);
> 10minuteORlow= .....;
>  
> _SECTION_END();
>  
>   
>  
>  
> 
> 
> --- On Fri, 29/5/09, Rajiv Arya <rajivarya87@xxx> wrote:
> 
> 
> From: Rajiv Arya <rajivarya87@xxx>
> Subject: RE: [amibroker] Intraday - Open 10 Minute Price Marker
> To: amibroker@xxxxxxxxxxxxxxx
> Received: Friday, 29 May, 2009, 6:12 AM
> 
> 
> 
> 
> 
> 
> 
> 
> newday=day(0! =ref(day( ),-1);
> highofday=highestsi nce(newday, H,1);
> Lowofday=lowestsinc e(mewday, L,1);
> Rangeofday=highofda y-lowofday;
> importanttime= 94000;
> 10minuteORhigh= valuewhen( cross(timenum( ),94000), highofday, 1);
> 10minuteORlow= .....;
>  
> goodluck
> Rajiv
>  
> 
> 
> To: amibroker@xxxxxxxxx ps.com
> From: sfehendo@xxxxxx com.au
> Date: Thu, 28 May 2009 06:14:12 -0700
> Subject: [amibroker] Intraday - Open 10 Minute Price Marker
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hi
>  
> Can anyone provide me with a formular that would provide horizontal dotted lines as a marker for the opening 10 minute price range on an intraday chart.    
>  
> Many thanks
>  
> Ken
> 
> 
> 
> Need a Holiday? Win a $10,000 Holiday of your choice. Enter now.. 
> 
> 
> 
> 
> 
> Insert movie times and more without leaving Hotmail®. See how. 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>       Need a Holiday? Win a $10,000 Holiday of your choice. Enter now.http://us.lrd.yahoo.com/_ylc=X3oDMTJxN2x2ZmNpBF9zAzIwMjM2MTY2MTMEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzk3NwR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=14600t3ni/**http%3A//au.rd.yahoo.com/mail/tagline/creativeholidays/*http%3A//au.docs.yahoo.com/homepageset/%3Fp1=other%26p2=au%26p3=mailtagline
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/