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 CarlTrading, 03-31-2026, 09:41 PM
                1 response
                68 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                36 views
                0 likes
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                61 views
                1 like
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                62 views
                0 likes
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                53 views
                0 likes
                Last Post CarlTrading  
                Working...
                X