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

[amibroker] Re: Plot High Value Code Question



PureBytes Links

Trading Reference Links


no problem, any time. Sure I will consider reading another one of 
your questions


--- In amibroker@xxxxxxxxxxxxxxx, "ed nl" <ed2000nl@xxxx> wrote:
> this is the way to do it without loops like it should.
> 
> 
> TimeFrameSet( inWeekly );
> 
> wks = 4;
> highOfLastwks = HHV(H,wks);
> 
> store = ValueWhen(BarIndex() == BarCount - wks,highOfLastwks[ 
BarCount - 1 ]);
> 
> TimeFrameRestore();
> 
> store = TimeFrameExpand( store, inWeekly, mode = expandFirst  );
> 
> Plot(C,"",colorBlue,64);
> Plot(store,"",colorYellow,1);
>   ----- Original Message ----- 
>   From: Dean Hodgins 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Sunday, October 24, 2004 10:48 PM
>   Subject: [amibroker] Plot High Value Code Question
> 
> 
> 
>   I'm attempting to plot a straight horizontal line on a weekly 
chart 
>   that that uses the highest high of the last 4 weeks including 
the 
>   current week and plots that line horizontally.
> 
>   I've tried initializing a variable that finds a max value for 
the 
>   past 3 weeks but my coding doesn't work.
> 
>   /* Switch to weekly time frame */
> 
>   TimeFrameSet( inWeekly );
> 
>   maxhigh = Max(( "H", inWeekly, 0 ),( "H", inWeekly, -1 ),( "H", 
>   inWeekly, -2 ),( "H", inWeekly, -3 ));    ***** bad code here ??
> 
>   Pd1=Param("EMA 1 Period",5,2,200,1);
>   Pd2=Param("EMA 2 Period",8,2,200,1);
> 
>   Plot(EMA(C,pd1), "EMA 1",ParamColor( "Color EMA", 38 ), 
styleThick);
>   Plot(EMA(C,pd2), "EMA 2",ParamColor( "Color WMA", 21 ), 
styleThick);
>   Plot(maxhigh,"Pivot",colorBlack,styleLine);
> 
>   PlotOHLC( Open, High, Low, Close, "Modified " + Name(),
>   colorBlack, styleCandle );
> 
> 
> 
> 
> 
> 
>   Any help or suggestions would be much appreciated.
> 
>   Thanx & Regards,
> 
> 
>   Dean H.
> 
> 
> 
> 
> 
> 
> 
> 
>   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
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
>       
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of Service. 
> 
> 
> 
> [Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/