You would have to provide more information. Specifically, how did you 
initialize buyStop? What is the final code that you ended up with in AB for the 
IIf statements?

Mike

--- In [email protected], "loewenste...@..." <zl...@...> wrote:
>
> Mike
> 
> Your reply is appreciated however I am now running into a difference between 
> AB and TS2000. Basically in TS2000 the buystop does not widen at all since 
> the previous value is maintained at the latest highest level. In AB if it 
> drops for more than one day then the stop starts dropping too.
> 
> Do I need to start looking at using an array or can I store a variable?
> 
> Many thanks in advance.
> 
> --- In [email protected], "Mike" <sfclimbers@> wrote:
> >
> > You are missing a clause in your translation for the Trade Station part: 
> > AND buystop < buystop [ 1day day ago]
> > 
> > Also, rather than recalculating the offset array each time, it is better to 
> > store the value in an intermediate variable and only do the calculation 
> > once.
> > 
> > e.g.
> > 
> > avgPrice1DayAgo = Ref(averagePrice, -1);
> > notWideningBuyStop = IIf(averagePrice >= avgPrice1DayAgo && ...)
> > 
> > For plotting, you can use a number of pre-defined shapes in conjunction 
> > with the PlotShapes function. There are a number of posts in the User's 
> > Knowledge Base on this:
> > 
> > http://www.amibroker.org/userkb/?s=plotshapes
> > 
> > Mike
>


Reply via email to