Multi Time Frame Strategy Cancellation - NinjaTrader Programming | futures trading

Go Back

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

Multi Time Frame Strategy Cancellation
Started:June 18th, 2010 (12:19 AM) by jthom Views / Replies:1,243 / 2
Last Reply:October 9th, 2014 (11:00 AM) Attachments:0

Welcome to

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

Thread Tools Search this Thread

Multi Time Frame Strategy Cancellation

Old June 18th, 2010, 12:19 AM   #1 (permalink)
Elite Member
Sydney / Australia
Futures Experience: Intermediate
Platform: NT
Broker/Data: AMP
Favorite Futures: Oil
Posts: 116 since Jun 2009
Thanks: 125 given, 103 received

Multi Time Frame Strategy Cancellation


I currently have a multitimeframe strategy setup on 4 range and 1 range bars. 4 range handle the entry conditions and initial entry order, while the 1 range series handles order cancellation if the close price moves 2 ticks away from entry order.
The problem im having is that once an order has been placed, a cancellation preceeds it immediately.

if (Position.MarketPosition == MarketPosition.Flat && BarsInProgress == 0) { 
  if (
Bla Bla) {
entryOrder1 EnterLongLimit(0trueDefaultQuantityClose[0] - TickSize"Long 1a");
Buy true;}
if (
Position.MarketPosition == MarketPosition.Flat && BarsInProgress == 1) {
   if (
Buy == true && entryOrder1 != null && entryOrder1.LimitPrice != null && Close[0] == entryOrder1.LimitPrice TickSize) { 
Buy false;} 

The issue seems to be the use of Close[0] in BarsArray = 1. If I use Closes[0][0], it will wait for next 4 range bar to close before cancelling order, which is too far away.
I cannot use Indicator(BarsArray[1])[0] command as the indicator is custom 3rd party.

Any ideas on how to combat this?



Last edited by sam028; June 18th, 2010 at 04:42 AM. Reason: add coding tag
Reply With Quote

Old June 18th, 2010, 12:20 AM   #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 October 9th, 2014, 11:00 AM   #3 (permalink)
Trading Apprentice
Dallas Texas United States
Futures Experience: Intermediate
Platform: Ninja Trader
Favorite Futures: Futures, TF, ES, YM, 6E
Posts: 5 since Apr 2014
Thanks: 1 given, 0 received


Did you ever get this figured out? I'm having the same problem.



Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Multi Time Frame Strategy Cancellation

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Close bar recognization in multi time frame strategy pinto552 NinjaTrader Programming 6 September 6th, 2011 09:07 AM
Back to the Future! Back testing multi time frame strategy trades occuring in future mrticks The Elite Circle 10 April 2nd, 2011 09:54 AM
Multi-time frame strategy with periods of different size pequemec NinjaTrader Programming 2 February 24th, 2010 12:41 PM
visual multi-time frame scoring system. benbrooke Traders Hideout 1 October 4th, 2009 05:49 PM
Multi Volume/Time Frame Trading wh The Elite Circle 7 September 15th, 2009 04:55 PM

All times are GMT -4. The time now is 12:55 AM.

Copyright © 2016 by 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-10-28 in 0.08 seconds with 19 queries on phoenix via your IP