Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Vwap?
Collapse
X
-
Hello,
We don't have the VWAP available on our forums however you can find a popular version of the indicator here: https://www.bigmiketrading.com/downl...load.html?view
We have several 3rd party indicator providers and others may have there own versions as well available here: http://www.ninjatrader.com/Ecosystem/NonBroker.php#78
Let me know if I can further assist.LanceNinjaTrader Customer Service
-
Ok I just coded it, can you please tell me how to make the indicator stop drawing during after-market and pre-market hours (first statement after OnBarUpdate), Thank you
protected override void OnBarUpdate()
{
// Stop drawing during after-market and pre-market hours
if(ToTime(Time[0]) >= 160000 && ToTime(Time[0]) <= 093000 ){ }
// Calculate TypVical Price * V
TypV += ((Close[0]+High[0]+Low[0])/3 )*Volume[0];
//Calcualte the cumulative volume
cumulativeVolume += Volume[0];
Plot0.Set(TypV/cumulativeVolume);
// If at 9:30 or 16:00 then reset TypV
if( ToTime(Time[0]) == 93000 || ToTime(Time[0]) == 160000 ){
TypV=0;cumulativeVolume=0; }
}
Comment
-
Looks like you have the filter setup you just need to return if it's true
if(ToTime(Time[0]) >= 160000 && ToTime(Time[0]) <= 093000 )
return;
Also because you are setting things at 9:30 you'll want to change the condition to
if(ToTime(Time[0]) > 160000 && ToTime(Time[0]) < 093000 )LanceNinjaTrader Customer Service
Comment
-
I did it but it still plotting in the pre-market and after hours
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
// Stop drawing during after-market and pre-market hours
if(ToTime(Time[0]) > 160000 && ToTime(Time[0]) < 093000 ){
return;
}
// Calculate TypVical Price * V
TypV += ((Close[0]+High[0]+Low[0])/3 )*Volume[0];
//Calcualte the cumulative volume
cumulativeVolume += Volume[0];
// Plot the VWAP indicator
Plot0.Set(TypV/cumulativeVolume);
// If at 9:30 or 16:00 then reset TypV
if( ToTime(Time[0]) == 93000 || ToTime(Time[0]) == 160000 ){
TypV=0;cumulativeVolume=0; }
}
Comment
-
What a mistake, Thank you.
OK if anyone is visiting this page searching for the simple VWAP here it is attachedAttached Files
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Aviram Y, Today, 05:29 AM
|
0 responses
1 view
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
34 views
0 likes
|
Last Post Today, 05:15 AM | ||
Started by cls71, Today, 04:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
216 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
Comment