Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming


Notices
     

Getting the "OnBarUpdate()" method to actually execute once every second . . . .
Started:March 15th, 2012 (04:23 PM) by jmejedi Views / Replies:683 / 2
Last Reply:March 15th, 2012 (04:59 PM) Attachments:0

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

This forum was established to help traders by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

BMT is fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike
     

Reply
 
Thread Tools Search this Thread

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

Old March 15th, 2012, 04:23 PM   #1 (permalink)
Elite Member
Lilburn, GA
 
Trading Experience: Beginner
Platform: NinjaTrader
Broker/Data: VelocityFutures/TT
Favorite Instrument: ES
 
jmejedi's Avatar
 
Posts: 61 since Jan 2011
Thanks: 12 given, 3 received

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

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

Reply With Quote
     

Old March 15th, 2012, 04:23 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

     

Old March 15th, 2012, 04:59 PM   #3 (permalink)
Elite Member
Atkinson, NH USA
 
Trading Experience: Intermediate
Platform: NinjaTrader 7
Broker/Data: Mirus Futures/Zen-Fire
Favorite Instrument: Futures, CL
 
NJAMC's Avatar
 
Posts: 1,573 since Dec 2010
Thanks: 2,453 given, 1,763 received


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 [Cartesian Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Reply With Quote
     
The following 2 users say Thank You to NJAMC for this post:
     

Reply



Tags
chart, event, instrument, life, lom, manual, method, ninja, ninjascript, ninjatrader, nt, nt7, object, order, programming, setup, strategy, support, trading, volume
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Getting the "OnBarUpdate()" method to actually execute once every second . . . .

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saxo Bank's 10 "Outrageous Predictions" For "2012: The Perfect Storm" Quick Summary News and Current Events 0 December 17th, 2011 07:10 PM
Fukushima: "China Syndrome Is Inevitable" ... "Huge Steam Explosions", or "Nuclear Bo Quick Summary News and Current Events 0 November 22nd, 2011 01:50 AM
How to change "Stop Loss" and "Take Profit" in "shElderImpulse" Strategy javed759 NinjaTrader 1 November 1st, 2011 10:44 PM
"mid", "buy", "sell" volumes lokgotkent Traders Hideout 6 September 30th, 2011 01:24 PM
dealing with GetCurrentBidVolume and GetCurrentAskVolume , "long" casting into "int" jmejedi NinjaTrader Programming 4 May 23rd, 2011 09:33 AM


All times are GMT -4. The time now is 04:42 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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.
 
no new posts

Page generated 2014-04-18 in 0.12 seconds with 19 queries on atlantis via your IP 67.202.4.225