Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"Attach to Indicator" & Rithmic Order Limit violation

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

    "Attach to Indicator" & Rithmic Order Limit violation

    Hi NT,

    This is an order management question.

    With the rising volatility in the markets and to assist with order entry, I started to use the "Attach To Indicator" feature based upon the Bollinger Bands indicator.
    The BB indicator is set to calculate on "Price Change" or "Each Tick".
    I trade MNQ and place an order to buy/sell depending my view.

    I've noticed there is a significant number of modifications of orders.
    So many that I received a "Rithmic Order Limit violation" from my Funding company.
    That is, there has been 50,000 orders this week.
    That is obviously excessive and drains my computers resources.

    My question(s):

    1. I wanted to test my order approach in simulation before going back to live trading. Is there a way to find out how many order modifications I am actually sending?
    2. I am comparing using "Modify toward last price only" and not using it. It seems to reduce the number order modifications.
    Was that why the feature was created?
    Also, does that seem like a viable alternative?

    Finally, I wanted to adjust my orders based upon real-time market conditions. So simply setting the BB indicator to on "Bar Close" would miss opportunities and expose to unnecessary risk. Unless I am missing something, please advise

    Answers to my questions and further feedback would be greatly appreciated!

    Thanks
    Irv
    Last edited by ij001; 05-19-2022, 11:21 AM. Reason: Clarification

    #2
    Hello ij001,

    Thank you for your post.

    Unfortunately this would be expected if the indicator is set to calculate OnEachTick or OnPriceChange. Bollinger bands are price based, so every single time there's a change in price, the price the order attached to it would be submitted as a change. If the market is very volatile, as it's been lately, these changes may be extremely rapid. Using modify toward last price only would be expected to reduce the number of changes submitted, as it will only modify the order should the indicator change to a price closer to the last traded price. This prevents orders from modifying to price that would be worse than the previous value.

    Setting the indicator to OnBarClose would be the only way to guarantee a specific number of modifications per bar (one, when the bar closes).

    Changes to orders would be noted in the Log tab of the Control Center - they will have a "NewState=Change Submitted" notation.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Kate View Post
      Hello ij001,

      Thank you for your post.

      Unfortunately this would be expected if the indicator is set to calculate OnEachTick or OnPriceChange. Bollinger bands are price based, so every single time there's a change in price, the price the order attached to it would be submitted as a change. If the market is very volatile, as it's been lately, these changes may be extremely rapid. Using modify toward last price only would be expected to reduce the number of changes submitted, as it will only modify the order should the indicator change to a price closer to the last traded price. This prevents orders from modifying to price that would be worse than the previous value.

      Setting the indicator to OnBarClose would be the only way to guarantee a specific number of modifications per bar (one, when the bar closes).

      Changes to orders would be noted in the Log tab of the Control Center - they will have a "NewState=Change Submitted" notation.

      Please let us know if we may be of further assistance to you.
      Hi Kate,

      Yes, I understand. I will have to use bar on close so it will stop the violation.

      In real time, there is a price difference between BB Middle "each tick" and BB Middle "bar on close".
      For example: 11,963.08 - 11,956.75 = 6.33

      In real trading, I could estimate the difference in my head and use that estimate as an offset. However this manual approach exposes more risk in a challenging volatile market.

      Can you think of possible options on how to automate this or semi-automate to some degree?

      I was thinking there could be lines of code that calculate the difference and display it in the top right corner the screen.
      Then use Attach to Indicator and the difference used as an offset.
      However, I have never coded something like that.

      Perhaps I will think of other ideas over the coming days.

      NT Support and Community - are there better options out there that have been discussed or can be thought of?

      Thanks
      Irv

      Comment


        #4
        Hello ij001,

        Thank you for your reply.

        I neglected to remember you are using regular orders attached to the Bollinger and not an automated strategy. There wouldn't be a good way to accomplish what you're asking without NinjaScript programming, and I'm not sure if you would be able to accomplish your use case. If you're interested in getting into that, I can certainly provide some resources.

        Please let us know if we may be of further assistance to you.
        Last edited by NinjaTrader_Kate; 05-20-2022, 08:00 AM.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Kate View Post
          Hello ij001,

          Thank you for your reply.

          I neglected to remember you are using regular orders attached to the Bollinger and not an automated strategy. There wouldn't be a good way to accomplish what you're asking without NinjaScript programming, and I'm not sure if you would be able to accomplish your use case. If you're interested in getting into that, I can certainly provide some resources.

          Please let us know if we may be of further assistance to you.
          Hi Kate,

          Yes, I am interested. I would appreciate any resources.

          Also, how would an indicator look for calculating the difference between "Bar on Close" and "Each Tick"?
          I have not seen any code snippets in the guide that I could refer to.

          Currently in MNQ, visually I can see it ranges from 5 to 20 pts in real time.
          I place two BB bands, one with "Bar on Close" and another with "Each Tick".

          Thanks!
          Irv

          Comment


            #6
            Hello ij001,

            Thank you for your reply.

            Actually, pretty easy to make an indicator to tell you that that you could display on the chart to help you calculate that.

            I've attached a simple example below that you can look at the code for in the NinjaScript Editor after you import it from Tools > Import > NinjaScript Addon.

            Basically how it works is this:

            When the indicator calculates either OnPriceChange or OnEachTick, the same value that you'd get from running it On Bar Close would be accessible by checking the value of the indicator 1 bar ago (the most recently completed bar's Bollinger value. We can then simply subtract the currently forming bar's bollinger price and display that as a plot and also calculate the current difference in ticks, both of which are displayed.

            That being said, to use this indicator within a strategy you'd have to run the strategy On Price Change as well, as a hosted indicator will inherit its parent script's Calculate setting.

            As I previously mentioned, we do have resources to help you begin creating NinjaScript Strategies/Indicators. All links below are publicly available.

            The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

            I'm also providing a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.

            Strategy Builder 301

            NinjaScript Editor 401

            If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our NT7 help guide first:

            Basic Programming Concepts
            For general C# education I have personally found Dot Net Perls to be a great reference site with easy to understand examples.

            Browse examples for many languages, with explanations and code side by side for easy understanding.


            There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under New -> NinjaScript Editor -> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

            We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:

            Click here to see our NinjaScript Reference Samples

            Click here to see our NinjaScript Tips

            These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

            Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.

            Alphabetical Reference

            And our Educational Resources in the NinjaTrader 8 help guide.

            Educational Resources

            A set of specific tutorials for creating conditions in the NinjaTrader 8 Strategy Builder in the NinjaTrader 8 help guide.

            Condition Builder

            You can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify a script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

            Please let me know if I may be of further assistance.
            Attached Files
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Kate View Post
              Hello ij001,

              Thank you for your reply.

              I neglected to remember you are using regular orders attached to the Bollinger and not an automated strategy. There wouldn't be a good way to accomplish what you're asking without NinjaScript programming, and I'm not sure if you would be able to accomplish your use case. If you're interested in getting into that, I can certainly provide some resources.

              Please let us know if we may be of further assistance to you.
              Hi Kate,

              I had a follow up question after I did some reading in the NT 8 guide.

              Could a "simulated stop order" with some custom programming help achieve my goal?

              Recall, I set the BB to "each tick" and it resulted in orders being modified on each tick with rithmic and the exchange.
              The volatility put me into a violation.

              At present, I set BB to "Bar on Close", and am using the indicator you attached to help provide a real-time "offset".
              It works but is not ideal if I have to leave my computer.

              If orders were stored locally, until a condition was met, it would be more efficient. The price would be the best at that particular moment and would be better than what I can do manually.

              Any feedback before I contact a 3rd party developer?

              Thanks
              Irvin

              Comment


                #8
                Hello,

                Thank you for your reply.

                You can certainly try simulated stops. These will still be modified, but since you're not actually submitting it to the broker until it gets triggered, this may satisfy your needs.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,233 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                1 view
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                6 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,414 views
                0 likes
                Last Post Traderontheroad  
                Started by firefoxforum12, Yesterday, 08:53 PM
                0 responses
                11 views
                0 likes
                Last Post firefoxforum12  
                Working...
                X