Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Thanks for all your help. I don't really know what I'm doing but I tried pasting the 3 lines into my script in onbarupdate(?) and parameters into VWAP() and got it to compile without errors. However, it doesn't plot anything on my chart. Should it be VWAP().VWAPLine or just VWAP().VWAP for this VWAP indicator? I'll attach my indicator...
This works, however I was not able to pass the starttime and endtime parameters into the vwap function call. The line that is commented out had syntax errors.
The code is optimized for fast execution by using predefined instances of the external indicator (VWAP). Not doing this is poor practice.
This oscillator does a really great job of FOLLOWING the price. While coding it was fun, I do not see how it would be useful in trading.
protected override void OnBarUpdate()
{
if (!init)
{ //endtime = new TimeSpan(0, 0, 0);
//starttime = new TimeSpan(0, 0, 0); //vwap1 = VWAP(1, endtime, 3, 1, 2, 3, true, true, starttime);
vwap1=VWAP(Close); // define the instance of the external indicator to be used later
init = true; }
//endtime = new TimeSpan(0, 0, 0);
//starttime = new TimeSpan(0, 0, 0);