Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help adding a parameter with Strategy Builder.

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

    Help adding a parameter with Strategy Builder.

    How can I add a parameter which is only true if the pre market volume was more than lets say 1 million?
    I am using Strategy Builder.
    Thanks for everyone who helps.

    #2
    Hello Maoz1155,

    Thanks for your post.

    You could consider creating a bool variable (initially set to false) in the Inputs and Variables screen of the Strategy Builder.

    A Time Filter could then be created to have the strategy check if the time is during premarket hours. In the same Set, create another condition that checks if the Volume (Price folder > Volume) is greater than a Numerical value of 1 Million (Misc folder > Numerical value). Then in the Actions section, set your bool variable to True.

    Then you could check if the bool is true in other condition Sets.

    See this help guide page for information about creating a time filter to check if the time is between a range of times: https://ninjatrader.com/support/help...ateTimeFilters

    Note that you will need to create another condition in your strategy and flip the bool to false, otherwise it will remain true.

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Originally posted by NinjaTrader_BrandonH View Post
      Hello Maoz1155,

      Thanks for your post.

      You could consider creating a bool variable (initially set to false) in the Inputs and Variables screen of the Strategy Builder.

      A Time Filter could then be created to have the strategy check if the time is during premarket hours. In the same Set, create another condition that checks if the Volume (Price folder > Volume) is greater than a Numerical value of 1 Million (Misc folder > Numerical value). Then in the Actions section, set your bool variable to True.

      Then you could check if the bool is true in other condition Sets.

      See this help guide page for information about creating a time filter to check if the time is between a range of times: https://ninjatrader.com/support/help...ateTimeFilters

      Note that you will need to create another condition in your strategy and flip the bool to false, otherwise it will remain true.

      Let me know if I may assist further.
      For some reason it doesn't work for me.
      I am using a 1 min chart. The issue may be using "Volume (Price folder > Volume) is greater than a Numerical value of 1 Million" because it uses only 1 bar.
      Any way I can fix it?
      Also thank you so much!

      Comment


        #4
        Hello Maoz1155,

        Thanks for your note.

        That is correct, you would only be able to check the Volume for a single bar, and not the accumulated Volume during that timeframe.

        A limitation of the Strategy Builder is that it can only perform very simple math using offsets.

        You would need to unlock your code from the Strategy Builder by clicking the 'Unlock code' button and manually program this logic. You could consider creating a class-level double variable, checking if the Time is between the after-hours time frame and increment the variable by adding the Volume[0] to it. Then, you could check if the variable is greater than 1 Million and set your bool to True.

        See this help guide page for information about Volume[ ]: https://ninjatrader.com/support/help...ies_volume.htm

        For information about how to increment a variable using C#, you could do a quick Google search for something like 'how to increment variable C#'.

        Let me know if I may assist further.​
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Originally posted by NinjaTrader_BrandonH View Post
          Hello Maoz1155,

          Thanks for your note.

          That is correct, you would only be able to check the Volume for a single bar, and not the accumulated Volume during that timeframe.

          A limitation of the Strategy Builder is that it can only perform very simple math using offsets.

          You would need to unlock your code from the Strategy Builder by clicking the 'Unlock code' button and manually program this logic. You could consider creating a class-level double variable, checking if the Time is between the after-hours time frame and increment the variable by adding the Volume[0] to it. Then, you could check if the variable is greater than 1 Million and set your bool to True.

          See this help guide page for information about Volume[ ]: https://ninjatrader.com/support/help...ies_volume.htm

          For information about how to increment a variable using C#, you could do a quick Google search for something like 'how to increment variable C#'.

          Let me know if I may assist further.​
          Is there a way on Strategy builder to just to sum up each candle volume between my time zone??

          Comment


            #6
            Hello Maoz1155,

            Thanks for your note.

            No, this summing up the volume of each candle would require unlocking your code from the Strategy Builder as stated in my previous post.

            "You would need to unlock your code from the Strategy Builder by clicking the 'Unlock code' button and manually program this logic. You could consider creating a class-level double variable, checking if the Time is between the after-hours time frame and increment the variable by adding the Volume[0] to it. Then, you could check if the variable is greater than 1 Million and set your bool to True."

            Let me know if I may assist further.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            54 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            130 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            72 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            44 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X