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)
I'm new to both NT and futures.io (formerly BMT). I'm working on implementing a strategy that I've used on other systems, but I'm not sure how to access price updates tick-by-tick. I'd like to know how to address each incoming tick within the OnBarUpdate method. With "CalculateOnBarClose = true", I know how to use Open, High, Low, and Close in the OnBarUpdate method. But when I use "CalculateOnBarClose = false", I can't find any documentation on what gets updated in the OnBarUpdate method. Is it still the Close[0] value? Or are Open, High, Low, and Close all updated with the current price update?
Thanks in advance - JB
Can you help answer these questions from other members on NexusFi?
I guess it depends on what exactly you want to do with each incoming tick. One way you can use OnBarUpdate is to get the ask/bid values for the current bar update, with GetCurrentAsk() and GetCurrentBid(). If you want more than this, you may want to also look into OnMarketData, which allows you to collect more info on what happens at this tick level. The NT help is pretty descriptive and you have some keywords to play with now, but ask more if you cannot move forward with your code.
If you want to use Close[0] and get updated values for every change, you should keep CalculateOnBarClose = false. Then, Close[0] will always keep the price of the last trade, Open[0] will stay the same during the bar and contain the one value for the first tick of the bar, High[0]/Low[0] will keep being updated with the current high/low since the start of the bar.