NexusFi: Find Your Edge


Home Menu

 





question on Tick updates


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one JohnnyB with 2 posts (1 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 NJAMC with 1 posts (1 thanks)
    4. looks_4 Pajot with 1 posts (1 thanks)
      Best Posters
    1. looks_one Pajot with 1 thanks per post
    2. looks_two raffu with 1 thanks per post
    3. looks_3 NJAMC with 1 thanks per post
    4. looks_4 JohnnyB with 0.5 thanks per post
    1. trending_up 5,206 views
    2. thumb_up 4 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

question on Tick updates

  #1 (permalink)
 JohnnyB 
Chicago, IL
 
Experience: Advanced
Platform: prop
Trading: Options
Posts: 38 since Jan 2012
Thanks Given: 23
Thanks Received: 18

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
22 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 Pajot 
Toronto, ON
 
Experience: Intermediate
Platform: NT
Broker: IB
Trading: ES, CL
Posts: 148 since May 2010
Thanks Given: 13
Thanks Received: 38



JohnnyB View Post
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

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.

Cheers!

Pajot

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,395


JohnnyB View Post
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

I am not sure you can get the Tick at that point with COBC=false. Try looking at the callback OnMarketData():
OnMarketData()

This will fire with each tick coming into NT7 so you can take action or set variables for next OnBarUpdate().

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 JohnnyB 
Chicago, IL
 
Experience: Advanced
Platform: prop
Trading: Options
Posts: 38 since Jan 2012
Thanks Given: 23
Thanks Received: 18

Thanks for the info. I'm using Close now and it appears to be working. Thanks!

Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
 raffu 
Espoo, Finland
 
Posts: 11 since Dec 2010

And FirstTickOfBar property is very useful when you otherwise use "CalculateOnBarClose = false".

Reply With Quote




Last Updated on March 5, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts