Announcement

Collapse
No announcement yet.

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:	45
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

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by manueldecastro, Today, 04:57 AM
    0 responses
    4 views
    0 likes
    Last Post manueldecastro  
    Started by pthomas, 08-31-2020, 05:15 PM
    16 responses
    157 views
    0 likes
    Last Post peregrine  
    Started by YevhenShynkarenko, Today, 12:16 AM
    0 responses
    23 views
    0 likes
    Last Post YevhenShynkarenko  
    Started by LeroyO, Yesterday, 04:09 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by Raanman, Yesterday, 08:39 PM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_EricB  
    Working...
    X