Hello, I am wondering if it is possible to define a per-symbol margin for the backtest? For example I have tried:
if (name() == "DIA") { SetOption("AccountMargin", 9 ); }
if (name() == "TQQQ") { SetOption("AccountMargin", 30 ); }
if (name() == "TLT") { SetOption("AccountMargin", 6 ); }
// Bet sizing / Money Management
maxpos = 50; // maximum number of open positions
SetOption("InitialEquity", 100000 ); // set initial equity = 100K
SetOption( "MaxOpenPositions", maxpos );
SetPositionSize( 10, spsPercentOfEquity );
But it doesn't seem to be doing anything. Is there a way to accomplish this simply? Or would I have to go into the custom backtester?