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");
        BertrandNinjaTrader Customer Service

        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 -


            BertrandNinjaTrader Customer Service

            Comment


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

              Thanks

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,609 views
              0 likes
              Last Post aligator  
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              9 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              19 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              6 views
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              16 views
              0 likes
              Last Post Javierw.ok  
              Working...
              X