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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          61 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          148 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          99 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X