• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with Order Price

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

    Problem with Order Price

    I have an automated strategy that is trading some currency pairs, and am running into an issue where the price generated by the strategy is invalid - basically the price does not meet the right step size for the broker. In other words, the price should be 105.545, and is getting rejected with a price of 105.544 (not a .005 increment). Is there an easy way to set this?

    #2
    Unfortunately this is not supported. You either could go with full pips or sub-pips (1/10 of a pip). NT7 (first beta early next year) will support 1/2 pip.
    DierkNinjaTrader Customer Service

    Comment


      #3
      Pip Increments

      Is there perhaps a way to round the price to the nearest half pip increment before it is submitted?

      Comment


        #4
        Sure, you could custom code rounding logic in C#/NinjaScript. Unfortunately I don't have a sample at hand.
        DierkNinjaTrader Customer Service

        Comment


          #5
          I have the same problem .
          I change my script to:

          EnterLongStop(DefaultQuantity, Instrument.MasterInstrument.Round2TickSize(Highest High[0]) "");

          I dont know? Could this work?

          Comment


            #6
            This would round to a full pip or a subpip (1/10 of a pip) dependent on actual settings on Tools->Options. If would not round to 1/2 of a pip.
            DierkNinjaTrader Customer Service

            Comment


              #7
              So its nesasary to also change my Stop and Profttraget orders?

              Comment


                #8
                Hello,

                You will need to set this setting correctly for your data feed.
                DenNinjaTrader Customer Service

                Comment


                  #9
                  Ok, now i have set the settings from 1pip to half pip like in the connection guide.
                  But now i have a new problem. If i run a backtest with my strategy i can see that the stops are not calculatet correct.
                  I use SetStopLooss.

                  SetStopLoss("ForexC", CalculationMode.Ticks,Instrument.MasterInstrument. Round2TickSize(35), false);

                  What could be the problem? If i user 1pip in the settings, it calculates correct.

                  Comment


                    #10
                    coasty: I stand corrected. Latest 6.5.1000.6 already supports HalfPip in Tools->Options->Misc. No need to wait for NT7. Sorry for confusion.

                    Hugo: I'm not aware of any currency pair price which could be "35". Please clarify.
                    DierkNinjaTrader Customer Service

                    Comment


                      #11
                      35 Ticks = 0.0035 pips

                      Comment


                        #12
                        Round2TickSize only makes sense for absolute prices but not tick offsets.
                        DierkNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by profitabletrader306, Today, 12:00 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post profitabletrader306  
                        Started by marcelodelta, Yesterday, 08:28 PM
                        2 responses
                        11 views
                        0 likes
                        Last Post marcelodelta  
                        Started by junkone, Yesterday, 09:06 PM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_Marco  
                        Started by ferenc., Yesterday, 04:54 PM
                        2 responses
                        17 views
                        0 likes
                        Last Post ferenc.
                        by ferenc.
                         
                        Started by rwilliam, Yesterday, 03:51 PM
                        1 response
                        13 views
                        0 likes
                        Last Post NinjaTrader_ShawnB  
                        Working...
                        X