futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming


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

Welcome to futures.io.

Welcome, Guest!

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

We are 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
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: VelocityFutures/TT
Favorite Futures: ES
 
jmejedi's Avatar
 
Posts: 62 since Jan 2011
Thanks: 13 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
 
Futures Experience: Intermediate
Platform: NinjaTrader 7/8
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL
 
NJAMC's Avatar
 
Posts: 1,860 since Dec 2010
Thanks: 2,915 given, 2,203 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 [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



futures.io > Futures Trading, News, Charts and Platforms > 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



Upcoming Webinars and Events (4:30PM ET unless noted)

FIO Journal Contest with over $2000 in prizes [entire month]

September
 

John Hoagland (TopstepTrader): From The Pits to The Screens

Sep 1
 

John Grady (sponsored by Jigsaw Trading): Choosing the right market

Elite only
 

Ferran Font Ramentol (sponsored by Stage 5): Scalping the Order Book w/HFT's

Elite only

Brannigan Barret: agenda TBA

Elite only
 

Tradovate: the modern, cloud-based futures trading platform

Sep 22
 

Jigsaw Trading: Standalone Tools now available

Sep 26

Suri Duddella: The 10 Basic Trading concepts to follow in the Markets (part 2 of 2) [w/book giveaway]

Elite only

Linda Bradford Raschke: agenda TBA [w/book giveaway]

Elite only

Raymond Deux (NinjaTrader): NinjaTrader 8 overview and Q&A

Elite only

FuturesTrader71: agenda TBA (part 4 of 4) [w/book giveaway]

Elite only

Corey Rosenbloom: agenda TBA [w/book giveaway]

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/FIO member shodson

Elite only

An Afternoon with FIO trader GFIs1

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Oct TBD
     

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 06:11 PM.

Copyright © 2016 by futures.io. 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 2016-08-27 in 0.08 seconds with 19 queries on phoenix via your IP 54.198.15.59