NexusFi: Find Your Edge


Home Menu

 





Getting the "OnBarUpdate()" method to actually execute once every second . . . .


Discussion in NinjaTrader

Updated
    1. trending_up 2,924 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Getting the "OnBarUpdate()" method to actually execute once every second . . . .

  #1 (permalink)
 
jmejedi's Avatar
 jmejedi 
Lilburn, GA
 
Experience: Beginner
Platform: NinjaTrader
Broker: VelocityFutures/TT
Trading: ES
Posts: 62 since Jan 2011
Thanks Given: 13
Thanks Received: 4

Fellow NT brothers & sisters,

I am having the following situation:

I want my strategy to execute the OnBarUpdate() method once every second , that is , for each second that passes , I want my strategy to call the OnBarUpdate() method ............ but here's what I am noticing ......... say ,,,,, for the M6A instrument ....... where trading volume is low ................. I put my strategy on a chart of 1 second . . . . . . . . . so I am expecting that my OnBarUpdate() method will be called every 1 second ....... but that's not happening ....... because apparently for the M6A instrument on a chart of 1 second ... its not always the case that a bar updates once every second ............. so I have this problem .................. how do I get my OnBarUpdate() method to actually execute once every second ?

Thanks in advance for any help you may provide,
- Jimmy

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #3 (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


Hi,

I haven't done it yet, but started looking into the problem myself for LOM as I had the same problem. Wanted aX second life on an order for example.

You need to setup a Timer that fires and event to:
TriggerCustomEvent(CustomEvent customEvent, int barsIndex, object state)

Here is the direct link in the NT manual:
TriggerCustomEvent()

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:




Last Updated on March 15, 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