Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using SCript Wizard To Create Multilple Order Entries with Different Price

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

    Using SCript Wizard To Create Multilple Order Entries with Different Price

    Can it be done in the Wizard?

    I'm looking for a script that would do the following when run:

    -enter 2 Long Limit order below the Bid
    -enter 2 Long StopLimit order above the Ask price

    It is sound simple but I can only get the script to enter one entry at a time but not all 4.

    Thanks

    #2
    Tranbo, please try setting Entries Per Direction to a higher value.
    Attached Files
    AustinNinjaTrader Customer Service

    Comment


      #3
      The "Entries Per Direction" doesn't do it. I set it to 4 it gave me 4 entries of the same price position.

      How do I get 4 entries for 4 limit order with 4 different price?

      Anything wrong with the condition set below?

      // Condition set 1
      if (OpenLongPosition == true)
      {
      EnterLong(DefaultQuantity, "");
      EnterLongLimit(DefaultQuantity, GetCurrentBid() + -10 * TickSize, "");
      EnterLongLimit(DefaultQuantity, GetCurrentBid() + -20 * TickSize, "");
      EnterLongStop(DefaultQuantity, GetCurrentAsk() + 10 * TickSize, "");
      EnterLongStop(DefaultQuantity, GetCurrentAsk() + 20 * TickSize, "");
      }

      Comment


        #4
        Please try with unique entry handling and per direction to 4, then use those code lines to add a unique name for each order -

        Code:
         
        EnterLongLimit(DefaultQuantity, GetCurrentBid() - 10 * TickSize, "1");
        EnterLongLimit(DefaultQuantity, GetCurrentBid() - 20 * TickSize, "2");
        EnterLongStop(DefaultQuantity, GetCurrentAsk() + 10 * TickSize, "3");
        EnterLongStop(DefaultQuantity, GetCurrentAsk() + 20 * TickSize, "4");

        Comment


          #5
          One more question on this topic. I noticed the entry that work keep changing due to the bid/price changing.

          What is the name or value of the Open Session Price? I'm looking for something that is static once the session open.

          Will keep you posted once I get this to work.

          Thank-You!

          Comment


            #6
            Correct, those orders expire after one bar per default and then would be resubmitted if your condition is still 'true'.

            For the session open as defined by your session begin / end times (chart properties) you can use the CurrentDayOHL indicator accessing the CurrentOpen plot -


            Comment


              #7
              I got it working now. But it not very useful LOL

              Thanks

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              35 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, Yesterday, 02:41 AM
              0 responses
              16 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              25 views
              1 like
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              40 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              34 views
              0 likes
              Last Post CarlTrading  
              Working...
              X