Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading at the Bid or Ask Price

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

    Trading at the Bid or Ask Price

    I have tried everything I can think to create a strategy that enters a trade using the BID or ASK price as a reference to another variable. In a simple example, buy this bar when the Bid price > EMA of 1 bar ago. 5 pip profit target, 10 pip stop. I can't get it to trade and I don't think I've ever had the BID or ASK work as a trigger. I am using the Wizard.

    Please help! Thx.

    #2
    jtfancher,

    Thank you for your post.

    Are you having issues with this strategy method in real-time? Or is this during historical backtesting?

    Have you used TraceOrders = True in your Initialize method to track down why the order might not be submitting?

    If not, please run this in real-time and let me know what errors are printed to the output window:

    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew - this is in real time.

      Comment


        #4
        Hello,

        Did you run TraceOrders = true?

        What did it output to the output window?
        MatthewNinjaTrader Product Management

        Comment


          #5
          where do I find this Matthew? Thanks

          Comment


            #6
            Hello,

            Please see the following thread on running TraceOrders:



            You will want to add this to your code and run it in real-time.

            You can open the output window by going to Tools--> Output window.

            This should give you more information as to why these orders might not be submitting. If you're unable to interrupt the errors reported, please post those here and I can take a look.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Originally posted by jtfancher View Post
              I have tried everything I can think to create a strategy that enters a trade using the BID or ASK price as a reference to another variable. In a simple example, buy this bar when the Bid price > EMA of 1 bar ago. 5 pip profit target, 10 pip stop. I can't get it to trade and I don't think I've ever had the BID or ASK work as a trigger. I am using the Wizard.

              Please help! Thx.
              What is the line of code you are using to enter the order?

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              648 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              369 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              108 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              572 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              574 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X