Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Lots

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

    Multiple Lots

    Thanks again NT Josh, Ben, and others.


    I just have a few quick questions before the weekend;

    -how does one buy multiple (EnterLong) lots within a strategy ? Sorry if I have missed something obvious...

    -how does one calculate tick information relative to Position.AvgPrice ? For example; if (Position.AvgPrice < (Position.AvgPrice-40 ticks)), do this.
    Average price would be the average of the multiple lots bought above ?




    thanks.

    #2
    You will want to increase your EntriesPerDirection to have multiple entries.http://www.ninjatrader-support.com/H...Direction.html

    You can get tick information with TickSize.
    Code:
    Position.AvgPrice - 10 * TickSize;
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Another question:

      I am using the following condition on a multi-trade strategy (EntriesPerDirection are multiple). The following is the first condition;


      if (Performance.RealtimeTrades.Count == 0)
      {
      EnterLong(1, "");
      }


      This condition succeeds, and buys trades when I initialize the script.
      But, after other trades are executed (entered and then exited), and there are 0 trades left, the strategy stays at "-" positions, and does not buy new positions.

      Is there some way to make sure that, after all previous entries are exited, that the strategy buys ONE position when the number of active positions == 0 ?
      Last edited by Faspomy; 10-28-2008, 05:04 PM.

      Comment


        #4
        Faspomy,

        I am not sure I follow. You load your strategy. The strategy has made zero real-time trades yet so it will EnterLong. You have now just made a real-time trade so you will this condition will never evaluate to true anymore.

        Count is not a count of how many you have active. It is a count of how many you have made total. To check if you are still in a trade you can just use:
        Code:
        if (Position.MarketPosition == MarketPosition.Flat)
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          It is a count of how many you have made total. To check if you are still in a trade you can just use:
          Code:
          if (Position.MarketPosition == MarketPosition.Flat)

          Thank you again Josh.
          Last edited by Faspomy; 10-28-2008, 09:49 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          580 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          335 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          102 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X