I am trying to build an indicator, which shows the current pressure at the ask and the bid and cumulates that volume until the inside market moves up or down and then does the same at the new pricelevels(bid and ask). I figured out several ways to get cumulative volume at price(onMarketData), but how can i reset that, when the inside market moves. I cannot figure out, how to program the change of position of the inside market;
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
Current Bid Ask Pressure Indicator
Collapse
X
-
Current Bid Ask Pressure Indicator
Hi,
I am trying to build an indicator, which shows the current pressure at the ask and the bid and cumulates that volume until the inside market moves up or down and then does the same at the new pricelevels(bid and ask). I figured out several ways to get cumulative volume at price(onMarketData), but how can i reset that, when the inside market moves. I cannot figure out, how to program the change of position of the inside market; -
Hi,
thanks for quick reply.
Not a new bar, but a change of the current bid and ask price, nothing to do with bars.
As long the current bid ask prices stay the same I want:
a. cumulative traded volume at the ask
b. cumulative traded volume at the bid
if bid ask prices move up or down
restart from zero with cumulation.
I know how to cumulate traded volume at price, but i do not know, how to program a change in bid ask levels, which whould be the condition to reset cumulative volume.
Attached picture shows position of inside market (blue box), I want cumulative vol at a and b, til inside market moves up or down and then restart cumulation at bid and ask.Last edited by keepsimple; 09-19-2014, 09:32 AM.
Comment
-
Keepsimple,
You would want to use a double variable to store the ask price and one for the bid price
You can then check if the ask or bid is equal to the variable to add that volume to the accumulation.
If not equal, this where you would reset the volume variable.Cal H.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by elirion, Today, 01:36 AM
|
2 responses
12 views
0 likes
|
Last Post
by elirion
Today, 07:21 AM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
5 responses
14 views
0 likes
|
Last Post Today, 07:18 AM | ||
Started by samish18, Yesterday, 08:31 AM
|
4 responses
14 views
0 likes
|
Last Post
by elirion
Today, 07:15 AM
|
||
Started by funk10101, Yesterday, 09:43 PM
|
1 response
14 views
0 likes
|
Last Post Today, 07:07 AM | ||
Started by TheWhiteDragon, 01-21-2019, 12:44 PM
|
5 responses
551 views
0 likes
|
Last Post Today, 07:05 AM |
Comment