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

Strategy Based on Volumetric Bars Data of Tick Update

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

    Strategy Based on Volumetric Bars Data of Tick Update

    Hi Professionals, I have been failing in writing a code for a strategy to execute Long if using volumetric bars ( 1 bar volume) on per tick update, if the delta is lets say +50% for 3 ticks in a row and volume so far is Y then execute a long position... Example in picture attached, where I circled. So strategy has 2 criteria: volume exchanged be more than Y and bid/ask delta be more than Y (lets say +50%) for the past 3 tick's in a row... criteria data collected from table at the bottom; makes sense? A sample code will be huge help... photo attached.

    Click image for larger version

Name:	Capture.JPG
Views:	426
Size:	154.0 KB
ID:	1123505

    #2
    Hello shahabjet1,

    Thank you for the post.

    You can access the volumetric bar data and there are some methods that can be used to gather different types of data from those bars. We have a sample of all of the available methods in the following link: https://ninjatrader.com/support/help...sub=volumetric

    The volumetric bars use CurrentBar index rather than 0 BarsAgo to access the current bar, its just reversed. With that being said if you needed to access previous bar data you would subtract the number of bars from CurrentBar, CurrentBar - 1.

    For 3 ticks in a row that would be a situation where you could use variables or really any kind of logic you wanted to keep track of the ticks in a row. A int variable may be choice here and count to 3, otherwise reset the value to 0 if the opposite condition is true.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello please i wish too a sample strategy with volumetric bars, I dont find any sample strategy in the forum, i am not programer but have a full license, Maybe somebody can help with this. Regards

      Comment


        #4
        Hello walter739,

        There is no specific sample strategy for volumetric data, the existing example in the help guide is generic so it works with both indicators or strategies.

        The volumetric data is also not something you can just reference in a simple way so it would require some amount of developing your script around how that data works.

        The sample I linked to in post #2 is the minimum required code needed to access the volumetric data from a script. You would need what is shown in that sample including the error checking to access the data. Once you have access to the data you would then need to program your script to do something with that data, however you intended to use it for trading.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by chbruno, Today, 04:10 PM
        0 responses
        1 view
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        6 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frslvr, 04-11-2024, 07:26 AM
        9 responses
        127 views
        1 like
        Last Post caryc123  
        Working...
        X