NexusFi: Find Your Edge


Home Menu

 





Breakout Strategy Using Limit Orders


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one goodoboy with 2 posts (0 thanks)
    2. looks_two bradhouser with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 marpol with 1 posts (0 thanks)
    1. trending_up 1,870 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Breakout Strategy Using Limit Orders

  #1 (permalink)
goodoboy
Houston
 
Posts: 380 since Dec 2016
Thanks Given: 344
Thanks Received: 246

Hello,

Still getting my feet wet with automation development

I want to make sure I am not over complicating my brain while trying to write on paper my strategy before moving to coding phase.

I just want to know if I am in the right direction.

Intra-day Breakout Retracement Entry Strategy:
Enter buy limit order at low of previous bar after long breakout condition is true.
stop loss -20ticks
profit target = 40 ticks
breakeven = after +20 ticks of profit.

Problem:
1. Using limit order, there is a chance that price never comes down to fill the limit order and continues up til profit target. I do not want to enter the trade if profit target price is touched before price goes down and order is filled. Also, if the conditions are true after order cancel, I don't want to re-enter another trade until breakout in opposite direction occurs.

2. After breakeven, if conditions are still true, I don't want reenter the trade again.

Questions:
1. In my coding will I need think of and write some type of tracking logic so the robot knows to not enter a trade after cancel order or breakeven orders or does NinjaTrader already have something I can use.

This my first time writing code and first robot building. Now I learning the limit order does add a changellage but I am sure I am not the first one

Thanks, just making sure I am not over thinking.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
bradhouser
Northern California where the girls are warm
 
Posts: 122 since Nov 2010
Thanks Given: 15
Thanks Received: 72



goodoboy View Post
Hello,



Still getting my feet wet with automation development



I want to make sure I am not over complicating my brain while trying to write on paper my strategy before moving to coding phase.



I just want to know if I am in the right direction.



Intra-day Breakout Retracement Entry Strategy:

Enter buy limit order at low of previous bar after long breakout condition is true.

stop loss -20ticks

profit target = 40 ticks

breakeven = after +20 ticks of profit.



Problem:

1. Using limit order, there is a chance that price never comes down to fill the limit order and continues up til profit target. I do not want to enter the trade if profit target price is touched before price goes down and order is filled. Also, if the conditions are true after order cancel, I don't want to re-enter another trade until breakout in opposite direction occurs.



2. After breakeven, if conditions are still true, I don't want reenter the trade again.



Questions:

1. In my coding will I need think of and write some type of tracking logic so the robot knows to not enter a trade after cancel order or breakeven orders or does NinjaTrader already have something I can use.



This my first time writing code and first robot building. Now I learning the limit order does add a changellage but I am sure I am not the first one



Thanks, just making sure I am not over thinking.


Have you tried setting you buy order as a market order? When your price is hit, you will get filled immediately with some possible slippage.



Sent from my iPad using futures.io

Reply With Quote
  #4 (permalink)
goodoboy
Houston
 
Posts: 380 since Dec 2016
Thanks Given: 344
Thanks Received: 246


bradhouser View Post
Have you tried setting you buy order as a market order? When your price is hit, you will get filled immediately with some possible slippage.



Sent from my iPad using futures.io

Thank you bradhouser,

I appreciate your response,

Yes, I can use market order once the strategy executes on bar close, but I prefer limit orders for to get better entry prices on retrace.

Of course just buying/selling with market orders once the all strategy conditions is true would solve this problem, butttt price entry will be kinda offset from what I am use to taking. But the reward to market orders are I want miss those big runs that's often missed waiting on retrace.

However, programming retracement with limit orders is a challenge so far. At least for me it is.

Reply With Quote
  #5 (permalink)
 marpol 
San Francisco, CA
 
Experience: Advanced
Platform: IB-TWS, Ninja, Wave59, R
Broker: IB, IQFeed
Trading: ZB
Posts: 37 since Sep 2013
Thanks Given: 0
Thanks Received: 26

NT8's order management is pretty good. you can set targets and stops and they will only be executed if you have entered a trade.

Here is the link to help you out: https://ninjatrader.com/support/helpGuides/nt8/en-us/order_methods.htm


you can use SetProfitTarget() SetStopLoss().

Just remember you will need to cancel your limit order if it is not filled (eventuly) so you do not have hanging orders...just FYI

Reply With Quote




Last Updated on April 13, 2017


© 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