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 Trader.Jon with 1 posts (0 thanks)
    3. looks_3 MooreTech with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,216 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 2 attachments




 
Search this Thread
  #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,336

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:	181
Size:	24.2 KB
ID:	29238   Click image for larger version

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

Can you help answer these questions
from other members on NexusFi?
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
Iran War Prediction Markets: Ceasefire 16%, Ground Invas …
Prediction Markets & Event Contracts
CPI Eve: Fed Hike Odds Hold at 52% for the First Time, I …
Prediction Markets & Event Contracts
SEC and CFTC Unlock Customer Cross-Margining for Treasur …
Treasury Notes and Bonds
NinjaTrader Parent Payward Acquires Bitnomial for $550M …
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 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 X 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,336

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


© 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