Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Is there a way to make the strategy load the charts automatically?

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

    Is there a way to make the strategy load the charts automatically?

    I'm trying to get an automated trading systems ready, I've got a strategy that works on currency, doesn't matter which one you use it against it works. The variable for me is my account size, I can safely trade 17 currency with a $10,000 account size using $50 entries (10,000) + 1% of the profit in the account above $10,000.

    The idea is that when it reaches $12,000 it enables another currency and so on ans so forth until all are traded with it. Any ideas?

    #2
    Hello happypappy,

    Thank you for your post.

    There is nothing by design in NinjaTrader to achieve this. However, you could potentially write to an external file and then read from it from another strategy. An example of reading and writing can be found at the following link: http://www.ninjatrader.com/support/f...ead.php?t=3477

    Comment


      #3
      So there is no programmable method to load a chart? I found an example of loading a workspace. Is there something similar for charts?

      protected override void OnStartUp()
      {
      NinjaTrader.Gui.WorkspaceOptions.SwitchWorkspace(" D:\Documents and Settings\User\My Documents\NinjaTrader 7\workspaces\123.xml", true);
      }

      I need some time to test tonight, but if I had a workspace setup for each Currency, could I just use the above to load a new chart each time I needed to, obviously not in the OnStartUp but OnBarUpdate() trigger if account > x.
      Last edited by happypappy; 12-21-2014, 11:16 PM.

      Comment


        #4
        Unfortunately, there is not.

        Comment


          #5
          Sorry pat I updated my post, can I load more then one workspace to open charts? Like if I load workspace 1, then load workspace 2 does it close the charts from workspace 1?

          Thanks for the quick reply btw.

          Comment


            #6
            Originally posted by happypappy View Post
            Sorry pat I updated my post, can I load more then one workspace to open charts? Like if I load workspace 1, then load workspace 2 does it close the charts from workspace 1?

            Thanks for the quick reply btw.
            All good mate, thank I answered my own questions.



            I'll experiment with it tonight see how it goes, Ill just create the first 17 in Workspace1.XML and seperate the next 5 into the code, Load Workspace2.XML when it gets to account size X, Workspace3.XML when it gets to account size Y etc etc.

            Then just switch between then, from the control center it *sounds* like account performance is all tied together anyway so I don't need to see the charts just need the strategys active against them.

            My only concern is I build an indicator that draws objects on the charts which helps determine entires, if the workspace is not active are the objects still being drawn against the charts?

            Otherwise the strategy will not enter and will likely error with 'Object Not Exist'?

            Comment


              #7
              Hello happypappy,

              Thank you for your response.
              Originally posted by happypappy View Post
              My only concern is I build an indicator that draws objects on the charts which helps determine entires, if the workspace is not active are the objects still being drawn against the charts?

              Otherwise the strategy will not enter and will likely error with 'Object Not Exist'?
              The objects would not be drawn if the workspace was not open.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by trilliantrader, 04-18-2024, 08:16 AM
              7 responses
              27 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by samish18, 04-17-2024, 08:57 AM
              17 responses
              64 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by rocketman7, Today, 02:12 AM
              2 responses
              17 views
              0 likes
              Last Post rocketman7  
              Started by briansaul, Today, 05:31 AM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by PaulMohn, Today, 03:49 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X