Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

General rounding question:

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

    General rounding question:

    I have 2 indicators that have values that do not always fall on the exact tic:
    Example (for ES):

    Indicator 1 has a value that is 1097.58. I want to ROUND this indicator up to the higher tic 1097.75

    Indicator 2 has a value that is 1095.98. I want to ROUND this indicator down to the lower tic 1095.75.

    How can I do this easily?.

    Is there a simple way to do this that will later port the indicator to other markets that trade in round numbers like FESX or 0.5 tic size like DAX without altering the script?.

    Thanks for any answers.

    #2
    jcook, you can use Round2TickSize for this specifically -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      jcook, you can use Round2TickSize for this specifically -

      http://www.ninjatrader-support.com/H...2TickSize.html
      This worked very well. Thanks a lot.

      Comment


        #4
        I got another question:

        I wish to create a simple strategy using my indicators.

        The indicators tell me where to stop and reverse. The strategy is always in the market and has 2 exits, one at a target and one on the stop and reverse level, which changes with the indicator.

        Is there a simple sample strategy I can edit to create this without much coding?

        Notice the stop and reverse orders are in the market ahead of the indicator crossover signal or whatever.
        Last edited by jcook; 02-19-2010, 07:27 AM.

        Comment


          #5
          jcook, there's unfortunately no real sample available for this scenario, you would potentially run into our internal order handling rules with this approach however -

          http://www.ninjatrader-support.com/H...verview36.html (bottom section of this link)

          So best would be to issue the signal to enter via a Market Order and then place a Limit order to exit (Mkt orders are excluded from the above order handling rules).

          NT7 will offer an unmanaged order handling approach as well -

          BertrandNinjaTrader Customer Service

          Comment


            #6
            mmmm. OK thanks. This is above my head for now.


            Originally posted by NinjaTrader_Bertrand View Post
            jcook, there's unfortunately no real sample available for this scenario, you would potentially run into our internal order handling rules with this approach however -

            http://www.ninjatrader-support.com/H...verview36.html (bottom section of this link)

            So best would be to issue the signal to enter via a Market Order and then place a Limit order to exit (Mkt orders are excluded from the above order handling rules).

            NT7 will offer an unmanaged order handling approach as well -

            http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by algospoke, Today, 06:40 PM
            0 responses
            1 view
            0 likes
            Last Post algospoke  
            Started by maybeimnotrader, Today, 05:46 PM
            0 responses
            6 views
            0 likes
            Last Post maybeimnotrader  
            Started by quantismo, Today, 05:13 PM
            0 responses
            6 views
            0 likes
            Last Post quantismo  
            Started by AttiM, 02-14-2024, 05:20 PM
            8 responses
            167 views
            0 likes
            Last Post jeronymite  
            Started by cre8able, Today, 04:22 PM
            0 responses
            8 views
            0 likes
            Last Post cre8able  
            Working...
            X