Sorry, but i'm still don't understand

> > You can use an IIf statement
> >
> > PositionSize = IIf(Buy,LongPositionSize,ShortPositionSize);
> >
> > or use it inside a SetPositionSize() call as follows:
> >
> > SetPositionSize(IIf(Buy,LongPositionSize,ShortPositionSize),spsValue)



If, for example, for a long position formula is:

PositionSize BuyPrice = -1 * / (2 * ATR (20));

then for a brief analogy short side should be:

PositionSize ShortPrice = -1 * / (2 * ATR (20));
but this not working...

How the formula of IFF can describe these two conditions simultaneously i one 
code?


Reply via email to