Issue with position sizing and Max open positions for portfolio backtesting

Hi everyone,
I recently purchased and doing some basics to familiarize myself with the system.

period = 20; // n bars 
PostionSize=-10; // 10% of Portfolio equity
SetOption("MaxOpenPositions",10); //set max number of open position to 10
ChannelBreakUp = Close > Ref( HHV( High, period ), -1 ); //Close is higher than yesterday's HHV
ChannelBreakDown = Close < Ref( LLV( Low, period ), -1 ); //Close is lower than yesterday's LLV
Buy = ChannelBreakUp;
Sell = ChannelBreakDown;

I noticed two things:
1.) Position exposure is the full portfolio equity
2.) There is only one position open at any time
What am I doing wrong?
Thanks,
Arpad

  1. Do you have "Allow position shrinking" turned ON?
  2. Did you turn on "Detailed report"?

To get better understanding of what is happening in your code and how functions work, use advice given here: How do I debug my formula?

1 Like

Thank you Tomasz, where has this product been all my life?!

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.