NexusFi: Find Your Edge


Home Menu

 





Multi Time Frame Strategy Cancellation


Discussion in NinjaTrader

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




 
Search this Thread

Multi Time Frame Strategy Cancellation

  #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?
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts