Strategy Indicator Communication / Market Replay - NinjaTrader Programming | futures io social day trading
futures io futures trading

Strategy Indicator Communication / Market Replay
Updated: Views / Replies:644 / 3
Created: by rymonroe 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 100,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

Thread Tools Search this Thread

Strategy Indicator Communication / Market Replay

  #1 (permalink)
Elite Member
Los Angeles, CA
Futures Experience: Beginner
Platform: NT
Favorite Futures: ES, ZN
rymonroe's Avatar
Posts: 15 since Nov 2012
Thanks: 5 given, 4 received

Strategy Indicator Communication / Market Replay

I have a muli time frame strategy that communicates with an indicator. When I back test it, it communicates with the indicator just fine executes trades as expected. I just tried using the Market Replay feature and I am getting some unexpected results. I was wondering if someone could take a look at my code to see if this is the correct way of implementing the communication between strategy and Indicator or if anyone has had trouble testing there strategy with market replay.

In Indicators (both are similar)
private BoolSeries bullIndication;
bullIndication= new BoolSeries(this);
 public BoolSeries BullIndication
      get { return bullIndication; }
if (goLong()) bullIndication.Set(true);

In strategy
Add(PeriodType.Day, 1);

if (LongIndicator().BullIndication[0] && !strategyHalt) EnterLongTrade();
if (ShortIndicator().BearIndication[0] && !strategyHalt) EnterLongTrade();

Reply With Quote
  #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.

  #3 (permalink)
Elite Member
Futures Experience: None
Platform: None Yet
Favorite Futures: Guitar
MrYou's Avatar
Posts: 403 since Jun 2011
Thanks: 618 given, 194 received

First off just so you're aware, the first two Add(Indicator()) statements are only needed if you want the [visual] indicator to be displayed on the performance results chart.

But your odd behavior is possibly because your if conditions are being applied to each time frame instead of one.

Meaning you'll want to do something like this:
if (BarsInProgress != 0)
BarsInProgress == 0 or BarsArray[0] is the primary time frame which is set from the NT GUI. You would reference those other time frames individually using BarsArray[] "from within" this primary time frame if using the code above or you would need to reference them using BarsInProgress/BarsArray.

Its been suggested to set your trade execution time frame to 1 second for backtesting purposes or a minimum of 1 minute if you only have minute data and not tick data.

Hopefully this makes sense, its late.

Reply With Quote
  #4 (permalink)
Elite Member
Los Angeles, CA
Futures Experience: Beginner
Platform: NT
Favorite Futures: ES, ZN
rymonroe's Avatar
Posts: 15 since Nov 2012
Thanks: 5 given, 4 received

Thanks for the reply MrYou. I am currently checking for BarsInProgress including returning on BarsInProgress==0. The problem I am seeing is at around 5:30am on the ES, I should be getting a buy signal from my indicators and go long. When I backtest, this is what happens. When I use market replay, I get a short signal and I go short. This is very confusing and frustrating for me. My only conclusion is that there is something wrong with Market Replay as my code I believe is sound.

Reply With Quote


futures io > > > > > Strategy Indicator Communication / Market Replay

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

July Journal Challenge - $500 in Amazon Gift Cards!


AXESS Trader: Powerful Cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Market replay keymoo TradeStation 4 September 13th, 2017 03:37 AM
What is the benefit of L2 data when running a strategy on Market Replay? benharrell NinjaTrader 9 April 3rd, 2015 04:29 PM
monthly replay data for strategy in nt7 gparkis NinjaTrader 1 September 19th, 2012 06:46 PM
[NinjaTrader]    Market Replay to backtest strategy symphys Platforms and Indicators 5 September 11th, 2010 03:24 PM

All times are GMT -4. The time now is 09:34 AM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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 2018-07-16 in 0.09 seconds with 14 queries on phoenix