Sample Advanced Automated Strategy v1.0 - NinjaTrader Programming | futures io social day trading
futures io futures trading


Sample Advanced Automated Strategy v1.0
Updated: Views / Replies:28,275 / 117
Created: by dsraider Attachments:15

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 15  
 
Thread Tools Search this Thread
 

Sample Advanced Automated Strategy v1.0

  #31 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

Hey Beth,

The code I sent for your BE and trail will do the following:

Set initial SL at -15 ticks.
Move SL to breakeven when you are +8 ticks in profit.
Move SL up two ticks when you are +10 ticks in profit and every two from then on.

You changed my original code a little but I have it move to breakeven when price = +8 and then kick in the trail when price is > 9 (which translates to 10). Subtle changes can make all the difference.

As far as your exit is concerned, if you now have it set to current bar, it should exit the instant you get a cross. If you want to make sure it closes as a cross, go back to [1]. This exit is a bit of a guess, as I don't use one and so am not certain of how it responds to FirstTickOfBar, but it's a good guess.

Let me know if I have your trail strategy right and how this works out. Again, the trail will work in simulation mode in case you don't want to wait for actual market conditions to test.

Good luck,
Dave

Reply With Quote
 
  #32 (permalink)
 Vendor: www.ezcolortrading.com 
Cambridge, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: 6E
 
Posts: 1,773 since Dec 2009
Thanks: 1,258 given, 1,196 received

Hi Dave

Thanks for your best wishes. The strategy worked funny starting 3:28, ie in-and-out within a second (per enclosed trade log). I also notice the following:

1. Trade No 4 Long @557: It went up to 582 and there's a BE SL trade @557 (cancelled status) before its closing @572. If the trail code was working, should there be some trail stop orders listed on the Orders tab?

2. Starting Trade No 6, it triggered in-and-out trades until 3:43 (you will see the trade markers on the enclosed chart).

I have absolutely no idea what I did wrong when adding the trail code. Sorry! Enclosed is my strategy with the trail code + the required indicators in case you want to run it (the strategy is supposed to work best on a 4-tick MedianRenko chart).

My super-mega Thank You for checking it for me please! Thank You .. Thank You!

Beth

Attached Thumbnails
Sample Advanced Automated Strategy v1.0-ym-03-10-3_10_2010-medianrenko-4-ticks-.jpg   Sample Advanced Automated Strategy v1.0-ym-trade-log-w-trail.jpg  
Attached Files
Register to download File Type: zip TheWizardv5ibRevised3timewTrail.zip (42.1 KB, 110 views)
Reply With Quote
The following user says Thank You to wgreenie for this post:
 
  #33 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received


Good news/Bad news....

The good news is I fixed your trail. Please make the following changes to your code:

SetStopLoss("Long ", CalculationMode.Ticks, 15, false); should be
SetStopLoss("", CalculationMode.Ticks, 15, false);

Also, in the trail part, (not the BE part) use:
SetStopLoss(longEntryID, CalculationMode.Price, newPrice, false); and
SetStopLoss(shortEntryID, CalculationMode.Price, newPrice, false);

The other problems you're having seem to be coming from your exit code. I ran into the same problems you did, until I commented that part out. The bad news, unfortunately, is that I don't know how to fix it. Maybe someone else more experienced with exits can give you a hand there. I'm sorry I couldn't be of more help. Let me know if you're able to solve it or if any other issues come up. And again, good luck.

Dave

Reply With Quote
The following user says Thank You to dsraider for this post:
 
  #34 (permalink)
 Vendor: www.ezcolortrading.com 
Cambridge, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: 6E
 
Posts: 1,773 since Dec 2009
Thanks: 1,258 given, 1,196 received

Thanks Dave for making the trail work. Time to celebrate!

I've made the suggested changes and will sim trade it tomorrow. Will try both false and true for CalculateOnBarClose unless you advise that true will not work for trail. Funny that the same Exit conditions (for those without trail) have been working over a week and no looping trades.

A member opines that

"Crazy multiple trades sometimes happens when set at CalculateOnBarClose = false. I think the strat gets overwhelmed."

Let's see what may happen tomorrow before my further investigation on the Exit conditions. My heartfelt thanks again Dave!

Beth

Reply With Quote
 
  #35 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

That is strange. Maybe if I were more experienced I'd be able to do more, but I'm really just a very, very stubborn newbie. I think setting it to true will not give you the results you want but I guess it doesn't hurt to try. Keep me posted. I hope you figure out the rest.

Dave

Reply With Quote
 
  #36 (permalink)
 Vendor: www.ezcolortrading.com 
Cambridge, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: 6E
 
Posts: 1,773 since Dec 2009
Thanks: 1,258 given, 1,196 received

Thanks Dave for your kind encouragement and best wishes. Hey, I'm lucky to have YOU fixing my trail code!

I will fix the [0] now to have CalculateOnBarClose: true version running as well. Will share the results with you.

Enjoy a Nice evening/Great Thu.

Beth (grateful)

Reply With Quote
 
  #37 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

Beth,

Do me a favor. Can you add FirstTickOfBar to your exit and set the condition back one bar like we did with the entry? It just occurred to me to try this. I should have thought of it earlier.

Dave

Reply With Quote
 
  #38 (permalink)
 Vendor: www.ezcolortrading.com 
Cambridge, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: 6E
 
Posts: 1,773 since Dec 2009
Thanks: 1,258 given, 1,196 received

Thanks Dave. I did set the exit conditions back one bar like we did with the entry. Just added "FirstTickOfBar" per your kind suggestion.

Close[0]<Low[1] and Close[0]>High[1] is one of the exit conditions for Long and Short respectively. I just noticed this version is more profitable than Close[1]<Low[2] and Close[1]>High[2] when I backtested the strategy. (Oh, it's an inadvertent error when I fixed the "back one bar" earlier.)

I wonder if I should keep this as-is or try both versions live tomorrow. What do you think?

Beth

Reply With Quote
 
  #39 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

I think you should go long 10 cars at open with no stops or targets and run screaming from your home! Okay, okay, I'm just kidding.

I see harm in trying both. I've read too many bad things about the inaccuracies of backtesting, so I'm all about testing live. Either way, I'll be happy if the strat works how it's supposed to.

Let me know,
D

Reply With Quote
 
  #40 (permalink)
 Vendor: www.ezcolortrading.com 
Cambridge, Ontario
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Zen-Fire
Favorite Futures: 6E
 
Posts: 1,773 since Dec 2009
Thanks: 1,258 given, 1,196 received


You're right on Dave! We canNOT trust backtest results especially MedianRenko ones. I learned this after backtesting my draft strategies and got really really excited LOL! Yes, only sim results (or maybe Market Replay ones) are more reliable.

Wish me luck tomorrow!

Night-night.

Beth

Reply With Quote

Reply



futures io > > > > > Sample Advanced Automated Strategy v1.0

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy Big Mike MultiCharts 39 November 9th, 2017 04:35 AM
VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy Big Mike NinjaTrader 63 November 6th, 2016 03:25 PM
End of day sample strategy mrticks The Elite Circle 9 February 18th, 2011 07:37 AM
VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy Big Mike NinjaTrader Programming 0 January 26th, 2010 06:22 AM
Advanced Strategy Writing zeller4 NinjaTrader Programming 8 December 28th, 2009 12:21 AM


All times are GMT -4. The time now is 09:25 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.13 seconds with 20 queries on phoenix via your IP 54.82.56.95