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

Re: [amibroker] Code help re Plot /Stop Values Needed



PureBytes Links

Trading Reference Links

wihtout going into loops perhaps this may be of use

MaxHigh = HighestSince(Buy,H);
MaxHighEMA = iif( barssince(buy)>=5, EMA(MaxHigh,5), null);

On 9/8/05, troll <deanhodgins@xxxxxxxxx> wrote:
> I have the following code which returns an ema smoothed array of
> highest highs since buy =1.
> 
> 
> MaxHigh = HighestSince(Buy,H);
> MaxHighEMA = EMA(MaxHigh,5);
> 
> 
> and the plotted equivalent
> 
> Plot(MaxHighEMA,"MaxHighEMA",colorWhite,styleLine);
> 
> Problem is that opening values or 1st 7 or 8 bars since the buy signal
> are distorted by the previous buy's equivalent highs. Ideally no
> values preceeding the current buy should be used for the ema
> calculation. Would there be any way of substituting a different array
> for the 1st x bars since the buy - maybe the buyprice value ...
> 
> 
> Any suggestions much appreciated ..
> 
> 
> Best  .
> 
> 
> 
> Dean H.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 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 other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/