"Minimum bars" - NinjaTrader | futures io social day trading
futures io futures trading


"Minimum bars"
Updated: Views / Replies:1,410 / 4
Created: by patbateman Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

"Minimum bars"

  #1 (permalink)
Elite Member
NY, NY
 
Futures Experience: None
Platform: T4, NinjaTrader
Favorite Futures: All!
 
patbateman's Avatar
 
Posts: 235 since Mar 2012
Thanks: 113 given, 193 received

"Minimum bars"

I know a strategy has an option to use the minimum bars, however NT7 only does this for the first open.

Is it possible to use some kind of indicator to prevent a strategy from trading before a certain number of bars has elapased?

Reply With Quote
 
  #2 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary


patbateman View Post
I know a strategy has an option to use the minimum bars, however NT7 only does this for the first open.

Is it possible to use some kind of indicator to prevent a strategy from trading before a certain number of bars has elapased?

I think the problem here is that you need an indicator training period, before you can rely on indicators to execute trades. You should therefore code your strategy in a way that

-> indicators are trained during the first N bars
-> and that trades are only executed once the training period has been completed

I typically use two start dates. The first start date for the indicators, and then the second start date for trade execution. I have serialized the start date allowing me to enter two dates in the dialogue box for the strategy.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #3 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received



patbateman View Post
I know a strategy has an option to use the minimum bars, however NT7 only does this for the first open.

Is it possible to use some kind of indicator to prevent a strategy from trading before a certain number of bars has elapased?

I am not sure if this helps answer your question, but there is a variable "CurrentBar" built into NT7. This starts out as 0 and increases with each additional bar, so a simple test could be:

if (CurrentBar<50)
return;

Put this at the start of your OnBarUpdate() function and the first time the rest of the code will be executed is on the 51st bar.

Here is the NT7 reference page:
NinjaTrader Version 7

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:
 
  #4 (permalink)
Elite Member
NY, NY
 
Futures Experience: None
Platform: T4, NinjaTrader
Favorite Futures: All!
 
patbateman's Avatar
 
Posts: 235 since Mar 2012
Thanks: 113 given, 193 received


NJAMC View Post
I am not sure if this helps answer your question, but there is a variable "CurrentBar" built into NT7. This starts out as 0 and increases with each additional bar, so a simple test could be:

if (CurrentBar<50)
return;

Put this at the start of your OnBarUpdate() function and the first time the rest of the code will be executed is on the 51st bar.

Here is the NT7 reference page:
NinjaTrader Version 7

Definitely what I was after, thanks for point me in the right direction ...I probably could of figured this out myself, but I've been exhausted this week!

Reply With Quote
 
  #5 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


patbateman View Post
Definitely what I was after, thanks for point me in the right direction ...I probably could of figured this out myself, but I've been exhausted this week!

No problem, one of the reasons I like futures.io (formerly BMT), it saves me LOTS of time while coding. Someone on here has almost always solved the problem before me. Good luck.

Nil per os
-NJAMC [Generic Programmer]

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

Reply



futures io > > > > "Minimum bars"

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fukushima: "China Syndrome Is Inevitable" ... "Huge Steam Explosions", or "Nuclear Bo Quick Summary News and Current Events 0 November 22nd, 2011 02:50 AM
How to change "Stop Loss" and "Take Profit" in "shElderImpulse" Strategy javed759 NinjaTrader 1 November 1st, 2011 11:44 PM
"mid", "buy", "sell" volumes lokgotkent Traders Hideout 6 September 30th, 2011 02:24 PM
Encoding a Hold signal for "X" bars? fredesch NinjaTrader Programming 6 May 12th, 2011 03:05 AM
"Share Bars" Chart Type ???? RJay Traders Hideout 1 October 24th, 2009 05:37 PM


All times are GMT -4. The time now is 01:24 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@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 2017-12-11 in 0.09 seconds with 19 queries on phoenix via your IP 54.145.16.43