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

Room to run?

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

    Room to run?

    I kind of figured it out
    Last edited by ezrollin; 09-24-2022, 10:47 PM.

    #2
    Hello ezrollin,

    Thanks for your note.

    Glad to hear you seem to have figured it out. That being said, please don't hesitate to reach out if you have any additional questions or concerns that we may assist you with.

    Thanks for using NInjaTrader. Have a great day!
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Click image for larger version  Name:	sadfasdfasfeaceavaeaaadfadsfdas.png Views:	0 Size:	28.1 KB ID:	1218656


      Ok, I dont have it figured out.
      I was trying to take trades on the 5minute (MES) based on this secondary series to see if there is room to run on a lower time frame (1minute MES) between price and the bollingers but its not working. Its acting like there is never a price difference between the price and the bollinger.
      This picture's simple condition never goes true, it never paints the background.

      I'm specifically telling it to watch the 5 minute and 1minute while I'm looking at the 5min chart.
      I'm guessing I just dont have it set up right? thanks


      Click image for larger version  Name:	sadfasdfasfeaceavaeaaadfadsfdas.png Views:	0 Size:	23.0 KB ID:	1218657

      Last edited by ezrollin; 10-08-2022, 10:13 AM.

      Comment


        #4
        Hello ezrollin,

        Thank you for your reply.

        I suggest adding a print statement to see if the condition is triggered as well as get the time when it was triggered. I have set up the same added data series and the following condition and action, and when I enable the strategy on an ES 12-22 chart I do see prints in the NinjaScript Output window in addition to the BackBrush being changed. I have created some screenshots to demonstrate:

        Additional Data - https://www.screencast.com/t/1TqGqwYYpR5
        Conditions and Actions - https://www.screencast.com/t/qcqzZPfZ8
        Print edit page - https://www.screencast.com/t/mtKdD5eSs8
        Output and BackBrush - https://www.screencast.com/t/4GwDyzHluJyH

        For more information about using prints to debug your code, please see the following post and link to a video showing how to add prints to the Strategy Builder:



        Please let us know if we may be of further assistance.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          Click image for larger version  Name:	sadfasdfasfeaceavaeaaadfadsfdas.png Views:	0 Size:	149.9 KB ID:	1219400

          Top panel is my 5minute (looking for high/low breakouts)
          Bottom is my 1minute panel (looking for room in the bollingers)

          My issues:
          1) Changing the background color should only be applied to the bottom 1 minute chart because thats the one we're trying to base the Bollinger Band upper/lower space on
          (the CONDITION is based on the 1minute as you can see) but you can only apply BackBrush to the top panel or all panels (not the lower panel or the Condition's panel)
          2) (same problem as #1) Printing the debug is printing based on the top 5minute panel, not the panel where the CONDITION has been added!!!!!!!!
          so its printing in 5minute intervals instead of the 1minute Bollinger Band space I specified

          Why is it disregarding that I SPECIFIED Data Series time intervals?
          This has been my problem from day 1 Thanks
          Last edited by ezrollin; 10-13-2022, 10:11 PM.

          Comment


            #6
            Hello ezrollin,

            Thank you for your reply.

            Is the 1-minute panel something you are manually adding to your chart to see visually? The Strategy Builder will give you the option of BackBrushAll to change the background for all chart panels, or BackBrush to change only the panel of the input series for the strategy. You would not be able to change only the BackBrush of the 1-minute data series since it appears that the 5-minute data series is the input series for your strategy.
            BackBrush: https://ninjatrader.com/support/help.../backbrush.htm
            BackBrushAll: https://ninjatrader.com/support/help...ckbrushall.htm

            Additionally, when using the Strategy Builder the OnBarUpdate() method is only called for the primary data series. There is a line of code that says:
            if (BarsInProgress != 0)
            return;

            This means that it will ignore OnBarUpdate() for any added data series. For more information about working with multiple time frames:


            Ultimately, what you are looking to achieve should be possible using a custom indicator as well as unlocking your strategy from the Strategy Builder and coding it directly in the NinjaScript Editor (this is due to the BarsInProgress limitation of the Strategy Builder). If you are interested in working on this yourself, I would be glad to provide you with additional resources to assist. Otherwise, I could get you in touch with out Vendor Support team for more information about NinjaScript consultants who may be able to develop this for you. Please let me know if one of these options interests you and I will follow up accordingly.

            I look forward to your reply.​
            Emily C.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Emily View Post
              Is the 1-minute panel something you are manually adding to your chart to see visually? ​
              yes, you can see its been added. The 5m on top and 1m on bottom


              Originally posted by NinjaTrader_Emily View Post
              Hello ezrollin,
              The Strategy Builder will give you the option of BackBrushAll to change the background for all chart panels, or BackBrush to change only the panel of the input series for the strategy.
              ​yes, I've tried applying backbrush (not backbrush all) to just my builder's 1min data series but it doenst cooperate.


              Originally posted by NinjaTrader_Emily View Post

              Additionally, when using the Strategy Builder the OnBarUpdate() method is only called for the primary data series. There is a line of code that says:
              if (BarsInProgress != 0)
              return;

              This means that it will ignore OnBarUpdate() for any added data series. For more information about working with multiple time frames:
              https://ninjatrader.com/support/help...nstruments.htm
              ​ok, so I cant use 2 data series in builder without unlocking it.
              but you can apply your strategy to your chart's data series and specify that builder incorporate another hidden data series?


              Can we vote that this gets changed in future versions to where it can work on 2 data series at the same time in builder? thanks

              Comment


                #8
                Hello ezrollin,

                Thank you for your reply.

                Even with an unlocked strategy, you are not able to visually plot an added data series. As a workaround to this, you could potentially add an indicator that plots in an additional panel, and you could code the indicator to plot the equivalent values of the bars from a data series; I just wanted to clarify in case you are interested in working with an unlocked indicator and adding it to a strategy.

                As far as the ability to work with different BarsInProgress other than just the primary series in the Strategy Builder, this has been submitted as a feature request to our development team. I will follow up with an internal tracking number for your reference as soon as it is created.

                "but you can apply your strategy to your chart's data series and specify that builder incorporate another hidden data series?"

                You can apply the strategy to any data series on a chart, and yes you could add more than one additional data series to your strategy, even in the strategy builder. If you want the OnBarUpdate() method to be processed more frequently, you would want to add the strategy to a more granular data series. In your case, I believe you are applying the strategy to a 5-minute chart. The strategy adds a 1-minute data series, but since it is on a 5-minute primary series OnBarUpdate() is only called every 5 minutes. If you are looking to use logic based on both a 1-minute and 5-minute series, you may want to consider adding both of those values to the strategy itself as well as applying the strategy to a granularity as small as at least a 1-minute chart data series to ensure that OnBarUpdate() is running as frequently as needed.

                Thank you for your patience.
                Emily C.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by aa731, Today, 02:54 AM
                0 responses
                4 views
                0 likes
                Last Post aa731
                by aa731
                 
                Started by thanajo, 05-04-2021, 02:11 AM
                3 responses
                469 views
                0 likes
                Last Post tradingnasdaqprueba  
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                10 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,237 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                4 views
                0 likes
                Last Post thread
                by thread
                 
                Working...
                X