• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Preventing Strategy from taking a trade in the opposite direction

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • demo166130
    replied
    Many thanks for that clear response.

    Regards

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello demo166130,

    Thanks for your post.

    To be clear you have posted in the NinjaTrader7 strategy development area so my reply will be based on using the NinjaTrader7 strategy wizard. If you are using NinjaTrader8 and the strategy builder, the answer will be relatively the same.

    In each set where you have an entry condition, add another condition that specifies the strategy position must be "flat" (so not long or short). In the conditions window, add the condition on the left side expand the strategy selection and select "Current market position", in the center select ==, on the right side select again the strategy selection and select "Flat". What the strategy wizard will show is: Position.MarketPosition == MarketPosition.Flat.

    When your strategy is in a position and if the opposite MACD condition occurs, no order can be placed because you are not flat, thus allowing your trade to end naturally on a profit or stop.

    Leave a comment:


  • Preventing Strategy from taking a trade in the opposite direction

    Hello,

    I've got a basic strategy which involves taking trades according to MACD crosses, but I would like the trade to run it's course according to the stop loss and profit targets set, however when the trade moves in the opposite direction and the MACD crosses against the trade direction the builder automatically closes out the position and reverses the direction. How would I use the Strategy Builder to prevent this from happening?

    Regards

Latest Posts

Collapse

Topics Statistics Last Post
Started by tff2011, Today, 03:55 PM
0 responses
1 view
0 likes
Last Post tff2011
by tff2011
 
Started by itrader46, Today, 03:24 PM
4 responses
8 views
0 likes
Last Post itrader46  
Started by MercuryRed, Today, 03:24 PM
0 responses
10 views
0 likes
Last Post MercuryRed  
Started by beobast, Today, 01:56 PM
1 response
4 views
0 likes
Last Post NinjaTrader_Jesse  
Started by daigo1, Today, 02:21 PM
2 responses
6 views
0 likes
Last Post daigo1
by daigo1
 
Working...
X