|
Andrew Thomas
2020-07-03 16:49:17
|
|
Hello
In a Trading System Strategy I would like to be able to set the number of positions to the number of selected equities based on the 'buy' rules. For example, if on a particular day the 'buy' rules select 5 stocks, I would like the number of positions to be 5 with all $s sent to those 5 stocks equally, if on another day the 'buy' rules select 38 stocks, I would like the number of positions to be set to 38 with all $s sent to those 38 positions equally. It seems like SetSimPosSize() or SetSimSetting(_NbPositions,) are the best choices for control of this variable, but they seem to require fore knowledge of how you want to divide up your investment either by %, shares, $ per position. Is there a way to sum the number of stocks matching the buy rules such that I could pass that variable to the SetSimPosSize function?
Thanks
Andy
|
|