Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Control

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

    Trade Control

    Hi

    How do I control the trades based on numbers.

    For example : I have assigned five strategies on the 100 Instruments. And it is possible at a time the five strategies hit more than 2 Instruments. But at a time I don't watch more than 2 Instruments.

    So how is it possible ? Should I write the global method for Trades control or any other way you have ?

    Thanks
    Sameer.

    #2
    Hello Sameer,

    Thank you for your post.

    If the instruments are added into the code you can use EntriesPerDirection to limit the entries per long or short. For information on EntriesPerDirection please visit the following link: http://www.ninjatrader.com/support/h...rdirection.htm

    If you are running 500 strategies and wish to limit all 500 to 2 entries this is not possible. Strategies cannot communicate with one another.

    Please let me know if I may be of further assistance.

    Comment


      #3
      Hi PatrickH

      If you are running 500 strategies and wish to limit all 500 to 2 entries this is not possible. Strategies cannot communicate with one another.
      I think It is possible using global method and the global method we can use in all strategies. Please verify the code.


      if (MaxTrades() < 2 && Close[0] > Close[1])
      {
      EnterLong();
      flag = 0;
      MaxTrades(flag);
      }

      if (CrossAbove(RSI(14, 3), 30, 1)
      {
      ExitLong();
      flag = 1;
      MaxTrades(flag);
      }


      // The Global method is...
      public int trade = 0;
      public int MaxTrades( int flag )
      {

      if (flag==0)
      {
      trade++;
      }

      if (flag==1)
      {
      trade--;
      }
      return trade;

      }


      Thanks
      Sameer.

      Comment


        #4
        chart trader

        Hi
        I am new to use ninja trader for trading.
        I have some kind of problem about how to use chart trader on ninja trader.
        I set stop loss and profit when I trade on chart. I have a trade and hold it more than a day so I turn off my computer. But when I turn on computer and run ninja trader again my stop loss and profit target that I have set it is not on the chart any more.
        How can I get my stop loss and profit target back and how can I keep it even I turn of ninja trader.
        Thank you

        Comment


          #5
          Hello Sameer,

          Thank you for your response.

          Best step here would be to test your UserDefinedMethod code with your strategy set to the SIM101 account.

          Comment


            #6
            Hello tamasuke,

            Thank you for your post.

            So I may investigate this matter further please answer the following questions.

            Are you trading to your live account or SIM101 account?

            Who are you connected to? This is displayed by green on lower left corner of the Control Center window.

            I look forward to your response.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X