Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Save on Ninja close, Resume

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

    Save on Ninja close, Resume

    I want to write a strategy that saves a few parameters somehow, and then when the strategy is resumed, those parameters are reloaded and the strategy is able to continue.

    For example, in it's simplest form, lets say I want to start an integer at 0 and increase it everytime a trade is placed. And then I want to shut down for the weekend.. When I come back on Monday, I want to show that integer as non-0 because trades were placed. Is the best way to do this still a text file, or has NT7 given us some other facility?

    Thanks,

    #2
    Hello Treeman,

    Welcome to the NinjaTrader forums!

    There is no persistance between strategy sessions so a file is one way to go about this. You may be able to do this through the use of global variables, but this is unfortunately beyond our scope of support. Check MSDN C# reference for this.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sn0z33r, Yesterday, 09:37 AM
    2 responses
    11 views
    0 likes
    Last Post sn0z33r
    by sn0z33r
     
    Started by jmrbtrader08, Today, 11:50 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Impeesa, Today, 11:53 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Brian.T, Today, 11:02 AM
    4 responses
    10 views
    0 likes
    Last Post Brian.T
    by Brian.T
     
    Started by juanfer, 02-11-2025, 07:29 AM
    2 responses
    10 views
    0 likes
    Last Post juanfer
    by juanfer
     
    Working...
    X