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 kezyclaire, 12-01-2023, 09:37 AM
|
3 responses
151 views
0 likes
|
Last Post Today, 07:03 AM | ||
Started by volIQ, Yesterday, 04:28 PM
|
1 response
13 views
0 likes
|
Last Post Today, 06:55 AM | ||
Started by martini, Yesterday, 04:45 PM
|
1 response
10 views
0 likes
|
Last Post Today, 06:45 AM | ||
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
7 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
Comment