Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How/when to set Account.SimulatorInitialCash with Strategy Optimization?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How/when to set Account.SimulatorInitialCash with Strategy Optimization?

    I would to set a different initial cash balance for my backtesting (Optimization) with the Strategy Analyzer and saw this SimulatorInitialCash property which looked like exactly what I needed but it doesn't change anything when I set it in both State.SetDefaults and State.Configure?

    Am I using it incorrectly? Or is there another way to change this value from the default of $100,000 for my ?

    From
    Code:
    public class Account : ISnapShotSerializable
            [SnapShotInclude(true)]
            public double SimulatorInitialCash { get; set; }​

    Edit: I even tried calling UpdateCashValue() but the balance stayed the same, $100,000.00.

    Code:
    ​Account.SimulatorInitialCash = 9888777.0;
    Account.UpdateCashValue(true);​
    Last edited by ntdev; 09-10-2022, 10:24 AM.

    #2
    Hello ntdev,

    Thanks for your post.

    Account.SimulatorInitialCash is not a document or supported NinjaScript method or property. There are no methods or properties available for setting the initial cash value of the Simulated account (Sim101) through code.

    You could set the initial cash value of the Simulated account from the account's Properties window.

    Go to the Accounts tab on the Control Center, right-click on the Simulation account, select 'Edit Account' from the right-click menu, and set your initial cash value for that account in the 'Initial cash' field.

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X