Positionsize changes


At the moment I have different position sizes for my longs an my shorts. My shorts are 1.5 bigger as my shorts. I also have multiple positions at one time. The corresponding code I’m using is:

SetPositionSize(IIf(Buy, 1, IIf(Short, 1.5, spsNoChange)), spsShares);

I want to change this. Only my first short should be 1.5 bigger as my long. Al other shorts should have the same size as my longs.

Any idea how I can solve this problem?

Kind regards,

You just need to count short signals.

ShortCount = Cum ( Short );
size = IIF( ShortCount <= 1, 1.5, 1 );
1 Like