NexusFi: Find Your Edge


Home Menu

 





Multi Time Frame Strategy Cancellation


Discussion in NinjaTrader

Updated
    1. trending_up 3,851 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 jthom 
Sydney / Australia
 
Experience: Intermediate
Platform: NT
Broker: AMP
Trading: Oil
Posts: 118 since Jun 2009
Thanks Given: 128
Thanks Received: 105

Hello,

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.

 
Code
                            
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) { 
   
CancelOrder(entryOrder1);
   
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?

Thanks

James


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
kconradbell
Dallas Texas United States
 
Posts: 5 since Apr 2014
Thanks Given: 1
Thanks Received: 0


James,

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

Thanks,

Conad


Reply With Quote




Last Updated on October 9, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts