NexusFi: Find Your Edge


Home Menu

 





New Strategy Coding Help


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one FatDemon with 25 posts (3 thanks)
    2. looks_two MWinfrey with 13 posts (10 thanks)
    3. looks_3 grimReaper with 6 posts (2 thanks)
    4. looks_4 vegasfoster with 2 posts (1 thanks)
      Best Posters
    1. looks_one MWinfrey with 0.8 thanks per post
    2. looks_two vegasfoster with 0.5 thanks per post
    3. looks_3 grimReaper with 0.3 thanks per post
    4. looks_4 FatDemon with 0.1 thanks per post
    1. trending_up 14,470 views
    2. thumb_up 17 thanks given
    3. group 23 followers
    1. forum 49 posts
    2. attach_file 9 attachments




 
Search this Thread

New Strategy Coding Help

  #31 (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


FatDemon View Post
I have to admit, I'm growing more curious to how well it would work without me cherry picking entries.

I've actually done this study before and found that it doesn't hold up over time. Just as an exercise, take the strategy that I sent you and look at every long entry over the last month during the time that you trade and see how it does. That should be pretty easy to do and won't take very long to do. That may provide you with some insight.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
22 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
20 thanks
  #32 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318


MWinfrey View Post
I've actually done this study before and found that it doesn't hold up over time. Just as an exercise, take the strategy that I sent you and look at every long entry over the last month during the time that you trade and see how it does. That should be pretty easy to do and won't take very long to do. That may provide you with some insight.

would it be hard to add the Short entry indicators to what you've done so far? Then I can manually go back and test it to see if it's worth pursuing. I've tried, but I'm a coding retard and cant seem to get it to work.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #33 (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


here you go...

Attached Files
Elite Membership required to download: FatDemonDonchianStrat.zip
Reply With Quote
Thanked by:
  #34 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318


MWinfrey View Post
here you go...

Big thanks!!! I'll back test it this weekend and see if I can modify it to be more methodical.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #35 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318


MWinfrey View Post
The problem is that I can't write a strategy that allows discretion. A strategy will take EVERY entry and you apply discretion. So i can't do what you are asking.

I now understand what you are saying MWinfrey. I used your code and added order execution to the signals. In my head, I thought I would be able to manually scale out of orders "at my discretion". Apparently, that isn't the case. Soooo, in order for it to work, there needs to be a static money management strategy to go along with. That totally blows.. I was hoping I could get my entry filled and stop placed with the script, then manually exit the second contract based on other variables. Now I understand.

So, I was thinking... There are three variables that would potentially make this work on complete auto pilot.

1. In one of the earlier posts, I attached a graphic of my ATM strategy. Is there a way to "call" that ATM strategy template when my orders are filled?

2. Can I have parameters that stop the script once a daily profit target is hit or loss. ...say +$500/-$300

3. Is it possible to set trading hours.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #36 (permalink)
 grimReaper 
Los Angeles, CA
 
Posts: 50 since Nov 2011

I wrote my version, I believe this is exactly what you want. Maybe we can compare results with Mike.

Doesn't look profitable. I don't use multiple targets. If it doesn't work trying each target individually, then it won't work when using multiple targets simultaneously. Also, I don't use a breakeven stop. For small trades it's not going to help.

edit: Results screenshot

Attached Thumbnails
Click image for larger version

Name:	Chart example.png
Views:	357
Size:	87.5 KB
ID:	95498   Click image for larger version

Name:	Chart example2.png
Views:	278
Size:	69.0 KB
ID:	95499   Click image for larger version

Name:	Results2.png
Views:	295
Size:	67.0 KB
ID:	95533  
Reply With Quote
  #37 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318


grimReaper View Post
I wrote my version, I believe this is exactly what you want. Maybe we can compare results with Mike.

Doesn't look profitable. I don't use multiple targets. If it doesn't work trying each target individually, then it won't work when using multiple targets simultaneously. Also, I don't use a breakeven stop. For small trades it's not going to help.

I noticed on your charts that you are taking 1 contract at entry. When I take an entry, it is always 2. One which takes a 2pt target, and the other to break even + 1 tick (for commissions) and left to catch a quick run up/down in price. The majority of success I've had trading this is that second contract.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #38 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318

Notice my ATM strategy @ the link below. What this strategy does is get me in the market to catch a run up or down of price (6-8 pts). Covering half at 8 tick is just managing losses and keeping me in the game long enough to catch the big fish for the day...and recover losses from earlier stopped positions.




Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #39 (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


FatDemon View Post
I now understand what you are saying MWinfrey. I used your code and added order execution to the signals. In my head, I thought I would be able to manually scale out of orders "at my discretion". Apparently, that isn't the case. Soooo, in order for it to work, there needs to be a static money management strategy to go along with. That totally blows.. I was hoping I could get my entry filled and stop placed with the script, then manually exit the second contract based on other variables. Now I understand.

So, I was thinking... There are three variables that would potentially make this work on complete auto pilot.

1. In one of the earlier posts, I attached a graphic of my ATM strategy. Is there a way to "call" that ATM strategy template when my orders are filled?

2. Can I have parameters that stop the script once a daily profit target is hit or loss. ...say +$500/-$300

3. Is it possible to set trading hours.

yes to all your questions. However, that does not address the issue of entries. Strategies will take EVERY entry where the conditions are met. Until you have a set of rules that is profitable without discretion all the yes answers are moot.

Reply With Quote
  #40 (permalink)
 
FatDemon's Avatar
 FatDemon 
San Francisco California, USA
 
Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Broker: Mirus Futures/Zen-Fire, Oanda
Trading: USD/JPY, ES
Posts: 110 since Nov 2012
Thanks Given: 48
Thanks Received: 318



MWinfrey View Post
yes to all your questions. However, that does not address the issue of entries. Strategies will take EVERY entry where the conditions are met. Until you have a set of rules that is profitable without discretion all the yes answers are moot.

That is what I'm suggesting. If I can set these three variables, perhaps then it "could" be a profitable strategy left to run on its own.

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on January 4, 2013


© 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