See if this helps you: http://amibroker.com/guide/h_pyramid.html
Mike --- In [email protected], "KBGlenn" <kbgl...@...> wrote: > > Please, please help with this...tks in advance > > --- In [email protected], "KBGlenn" <kbglenn@> wrote: > > > > I've read the user's manual and can't figure this out...please help > > with code. > > > > Example of what I want to do... > > > > If C > MA(C,20) Buy with position size 100% > > If C < MA(C,20) Scale down to 50% of position, but stay long > > If C > MA(C,20) Scale back up to 100% long position > > > > There is no total out position or total sell/closing of the position > > > > I've been able to use an iff statement in the setpositionsize function > > to get me in and out at 50 or 100% on a buy, but the problem is I'm > > using a the Sell function which pulls me totally out which I don't > > want to go. > > > > PLEASE Help! > > >
