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

[amibroker] Re: Help needed in coding



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "stocks_bobby" <stocks_bobby@xxx> 
wrote:
>
> Dear Group members,
> Kindly help me in coding
> 
> I WANT TO PLOT A LINE and CONDITIONS ARE
> 
> WHEN Close > LINE + 2 then line should automatically change to LINE = 
> LINE-2 and when Close < LINE-2 then LINE = LINE+2.
> 
> Problem arises if Close is between LINE+2 AND LINE-2
> 
> Kindly help me in coding it.
> Regards
> Bobby Kular
>

Don't know if this is what you are looking for, but maybe worth a try;
//example


indicatorline=MA(C,30);//ex line generated by indicator calculation
Lowline=IIf(C>(indicatorline+2),indicatorline-2,Null);//draw low line 
only if C>indicatorline+2
highline=IIf(C<(indicatorline-2),indicatorline+2,Null);//draw high line 
only if C<indicatorline-2

Plot(indicatorline,"",colorOrange);
Plot(lowline,"",colorGreen);
Plot(Highline,"",colorRed);

regards,
Ray


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

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/