Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Join Bid or Ask

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

    Join Bid or Ask

    Is it possible to program to join bid or ask or be best bid/ask

    #2
    Hello,

    Thank you for the question.

    I am unsure by the question what you are asking to program, could you provide more details on what you are trying to do?

    I look forward to being of further assistance.

    Comment


      #3
      what i mean is can you program if a condition is true to submit an order at the current bid or ask.

      and also keep keep your order as the best bid or ask until filled

      Comment


        #4
        Hello,

        Thank you for the clairification.

        Yes you can utilize the Bid or Ask prices in script. The easiest way is to use the GetCurrentBid and GetCurrentAsk methods:



        You can use these values in whatever equations you need to determine where the order is placed, depending on the order type you could also change the existing order to a new price or to Follow the price until filled.

        To move a order, you would just need to call the Enter method for the entry order again using a new price, as long as the order is open when you call the Enter method it would modify the existing order.

        I look forward to being for further assistance.

        Comment


          #5
          Hi Jesse

          How do you avoid submitting multiple entry orders instead of modify existing?

          Do you have an example of Follow the price until filled?

          Comment


            #6
            Hello fiddy,

            Thanks for your reply.

            You can use position information to prevent entries, for example:

            if (Position.MarketPosition == MarketPosition.Flat && your entry conditions)
            {
            // enter order here when flat and my conditions are true.
            }

            In the above "your entry conditions" would be your logic to determine the price to submit at. If the next time the code executes and the order has not filled then MarketPosition will remain flat and you would submit the new price/order using the same signal name, effectively following.

            Comment


              #7
              what would happen in the example provided if the entry conditions are true and an order is submitted but not yet filled and the conditions are true again.... will a new order be submitted or will the old order be modified.
              it is not clear to me how to go about modifying an existing order as opposed to submit a new order
              Can you please provide some more detail

              Comment


                #8
                Hello fiddy,

                Thanks for your reply.

                I've created a short video with live data showing a simple strategy to address the questions you asked. I've even left out the market position check because the "EntriesPerDirection" is set to 1. http://screencast.com/t/w3zSjMIsqnt

                If you have further questions I would encourage you to use your sim101 account and test out the questions similarly.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                558 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                545 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X