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)
OnBarUpdate not called for indicator within Stragety
I am playing with the priceactionswing indicator, and am running into a big problem - within my strategy, the PAS OnBarUpdate method is never called! I cant find anything relating to specific instructions on how to include an indicator within a strategy, so I simply created the indicator within the Initialise function of my strategy.
However the PAS OnBarUpdate is never called (verified with a print statement) and the structures within the object are never populated. Init and OnStartUp are called.
Is there an obvious step I am missing to link the embedded indicator to the data series of the strategy? I am an experienced programmer but very new to the NT universe, so I am not clear on how the OnBarUpdate event works and how to allow the indicator to subscribe to this event.
Can you help answer these questions from other members on NexusFi?
I think your problem is that Initalize is only called once. You probably want to add the indicator to your plot using the Add method from Initialize then set pas from OnBarUpdate.