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!
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
NinjaTrader
Strategy Based on Volumetric Bars Data of Tick Update
Collapse
X
-
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.
Tags: None
-
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
-
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 quantismo, 04-17-2024, 05:13 PM
|
5 responses
32 views
0 likes
|
Last Post Today, 11:32 AM | ||
Started by proptrade13, Today, 11:06 AM
|
1 response
5 views
0 likes
|
Last Post Today, 11:27 AM | ||
Started by love2code2trade, 04-17-2024, 01:45 PM
|
4 responses
34 views
0 likes
|
Last Post Yesterday, 10:31 PM | ||
Started by cls71, Today, 04:45 AM
|
2 responses
10 views
0 likes
|
Last Post
by eDanny
Today, 11:11 AM
|
||
Started by kulwinder73, Today, 10:31 AM
|
1 response
10 views
0 likes
|
Last Post Today, 11:01 AM |
Comment