NexusFi: Find Your Edge


Home Menu

 





Strategy Coding Challenge


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MWinfrey with 2 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 Trader.Jon with 1 posts (0 thanks)
    4. looks_4 MooreTech with 1 posts (1 thanks)
    1. trending_up 2,721 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 2 attachments




 
Search this Thread

Strategy Coding Challenge

  #1 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335

I realized that my GenericStrategy has flaws and am trying to correct them. Looks like I'm almost finished but have one logic challenge that I can't wrap my brain around. The situation is this. Let's say I have an entry for a target and runner and we're in a strong trend up. Multiple entries for targets can be placed while the runner is still in play. I don't want that. I want one target entry per runner. I can test to make sure the strategy is flat before entering again. But that takes away the stop and reverse potential.

Can't seem to figure out how to overcome this. I've attached a picture of what it does. Notice the mulitple target entries during the life of the runner.

Notice the one titled Wrong and how there are multiple entries. Now look at the one title Right_kind_of and how it looks the way I want without all those entries but there is supposed to be a stop and reverse at the end of the runner but there isn't one until a bar later.

Any ideas from you smart logic guys would sure be helpful...

Attached Thumbnails
Click image for larger version

Name:	Right_Kind_of.JPG
Views:	125
Size:	24.2 KB
ID:	29238   Click image for larger version

Name:	Wrong.JPG
Views:	118
Size:	23.5 KB
ID:	29239  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Tao te Trade: way of the WLD
24 thanks
Spoo-nalysis ES e-mini futures S&P 500
20 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #3 (permalink)
 MooreTech 
Orlando, Florida
 
Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Trading: ES
Posts: 57 since Aug 2010
Thanks Given: 6
Thanks Received: 73


Try checking that your position is not long before sending the long entry orders.

Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335

Good Grief! I overlook the simple so many times. This is the kind of challenge I continually have trouble with, making sure it's not something as opposed to making sure it is something. How's that for a convoluted description.

Thanks for splash of cold water.

Started this thread Reply With Quote
  #5 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


MWinfrey View Post
Good Grief! I overlook the simple so many times. This is the kind of challenge I continually have trouble with, making sure it's not something as opposed to making sure it is something. How's that for a convoluted description.

Thanks for splash of cold water.

It sounds like you have your answer ::: I was thinking 'entries per direction == 1' might be a factor.

Jon

Reply With Quote




Last Updated on January 25, 2011


© 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