Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting values on a strategy chart

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

    #31
    mpeac,

    Easiest way is checking when HaClose > HaOpen == A green HA bar.
    Ryan M.NinjaTrader Customer Service

    Comment


      #32
      Hello my friend Bertran I just want to ask something about this code. For example I have strategy working on Oil and here is the sample code of it:

      If (High[0] - Low[0] >= 0.12) //only 12cents and above for long else go short
      {
      // go long
      }
      else
      {
      // go short
      }

      Does that code will also work on Gold Instrument? How about the ticksize? Does it will play a big factor? Please help me. Thanks in advance.

      Comment


        #33
        luxurious_04,

        That snippet you posted checks when High[0] - Low[0] is greater than .12. Please review the prices of gold and you'll find that .12 is negligible. If you want to work with the ticksize instead, you can use TickSize property in NinjaScript.
        Ryan M.NinjaTrader Customer Service

        Comment


          #34
          Thanks RyanM, by the way is there a way that the strategy will know that the sell stop order has been rejected? I am using AtmStrategyClose() method to exit a position but it gets rejected. Now, I want to know how to check if my sell stop order was rejected.

          Comment


            #35
            luxurious_04, did you already check into GetAtmStrategyEntryOrderStatus()?

            Comment


              #36
              Yes I am using that method to know if my submitted order get filled but once my order got filled then I will erase the order because that is what being stated in the built-in SampleAtmStrategy. So, I could not used that method anymore to know if my stop was rejected after using AtmStrategyClose to exit a position. My concern is I want to know if my submitted stop order gets rejected using the AtmStrategyClose method to exit a position.

              Comment


                #37
                Hello,

                This would require programming your own ATM Strategy handling using the unmanaged approach in this case.

                As order information is all internal with that method and there is no way to track it when using ATMStrategyClose().

                Best you could do is check the log tab of the control center to see if any errors were reported and if so what were the errors and rejections?

                -Brett
                BrettNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

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