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 Mindset, 04-21-2026, 06:46 AM
              0 responses
              117 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by M4ndoo, 04-20-2026, 05:21 PM
              0 responses
              166 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by M4ndoo, 04-19-2026, 05:54 PM
              0 responses
              85 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by cmoran13, 04-16-2026, 01:02 PM
              0 responses
              130 views
              0 likes
              Last Post cmoran13  
              Started by PaulMohn, 04-10-2026, 11:11 AM
              0 responses
              88 views
              0 likes
              Last Post PaulMohn  
              Working...
              X