NexusFi: Find Your Edge


Home Menu

 





VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one calhawk01 with 10 posts (1 thanks)
    2. looks_two Big Mike with 9 posts (193 thanks)
    3. looks_3 stephenszpak with 6 posts (0 thanks)
    4. looks_4 spinnybobo with 6 posts (2 thanks)
      Best Posters
    1. looks_one Big Mike with 21.4 thanks per post
    2. looks_two piersh with 8 thanks per post
    3. looks_3 zeller4 with 7 thanks per post
    4. looks_4 Cloudy with 1.5 thanks per post
    1. trending_up 85,352 views
    2. thumb_up 231 thanks given
    3. group 61 followers
    1. forum 67 posts
    2. attach_file 3 attachments




 
Search this Thread

VIDEO TUTORIAL: How to create an advanced NinjaTrader Strategy

  #21 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

I just ran MyMoneyMaker_BigMike in the Optimizer. I'm not positive of what I see in the
attachment (included). Is the 1L, 2L, 3L in the 'executions' what one would expect? I'm thinking
that 3L means there are 3 long contracts in the market. I thought the strategy would only allow
one long (or short) at a time. (I'm extremely new to the Optimizer.)

- Stephen

Attached Thumbnails
Click image for larger version

Name:	positions in backtest.jpg
Views:	673
Size:	324.8 KB
ID:	16519  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
61 thanks
NexusFi site changelog and issues/problem reporting
46 thanks
Battlestations: Show us your trading desks!
37 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
25 thanks

  #22 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

I don't know if this thread is still active or not. If anyone wants to comment that's fine.

From post #11:

Hi Mike,

Thanks for the video Just wondering if you could explain your comments on why this particular optimization gives positive results but isn't actually profitable. I have only done a little optimization (on a different trading platform) and I'm wondering what is the point of optimization if the results can be so varied?

Would your next step be to forward test an optimized strategy to ensure it works? Just interested in your work flow.

TIA
There are a few reasons.

1) Not enough backtesting data. You need to really backtest for > 1 year, in my opinion.



I'm don't like moving averages in general, but if someone used a system that was backtested with moving
averages, and it was found to be profitable over the last, let's say 13 weeks (quarter year), then why wouldn't
optimizing it daily, always looking back 13 weeks (ie. 65 trading days) work to keep the system profitable?

- Stephen

Reply With Quote
  #23 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356


It seems I'm having trouble fully understanding the code of the video. The attachment
enclosed (YM) shows a long trade taken that was profitable and unprofitable at the same time.
One can see the green dots and red dots. I think I'm making a basic mistake regarding understanding
order placement and or quantity.

I thought the profitable long trade entered at the beginning of the day would be exited much much sooner.
Or maybe it is??

- Stephen

Attached Thumbnails
Click image for larger version

Name:	image July25.jpg
Views:	678
Size:	373.8 KB
ID:	17447  
Reply With Quote
  #24 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,319 since Jun 2009
Thanks Given: 33,142
Thanks Received: 101,474


stephenszpak View Post
It seems I'm having trouble fully understanding the code of the video. The attachment
enclosed (YM) shows a long trade taken that was profitable and unprofitable at the same time.
One can see the green dots and red dots. I think I'm making a basic mistake regarding understanding
order placement and or quantity.

I thought the profitable long trade entered at the beginning of the day would be exited much much sooner.
Or maybe it is??

- Stephen

Hi,

It's because there is more than one target...

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following user says Thank You to Big Mike for this post:
  #25 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

Ok. What I thought was happening was that the stoploss became a breakeven stop which
later became a trailing stop. Are you saying that all 3 stops are setup from the get-go? With
each one relaying off to the next? which is what seems to be happening here as I look more closely.

Also, it seems that if the system is long, it will not go short even if the 3 moving averages are
falling, IF none of the stops have been triggered. Is this correct?

Thanks for the previous reply,

- Stephen

Reply With Quote
  #26 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,319 since Jun 2009
Thanks Given: 33,142
Thanks Received: 101,474


stephenszpak View Post
Ok. What I thought was happening was that the stoploss became a breakeven stop which
later became a trailing stop. Are you saying that all 3 stops are setup from the get-go? With
each one relaying off to the next? which is what seems to be happening here as I look more closely.

Also, it seems that if the system is long, it will not go short even if the 3 moving averages are
falling, IF none of the stops have been triggered. Is this correct?

Thanks for the previous reply,

- Stephen

I'm sorry, I don't recall the particulars of it and no longer have it and don't do any NinjaTrader programming any more. My suggestion is to look at the Hurley thread, there are hundreds and hundreds of replies with advanced order management, break even stops, etc. You will learn a lot from the thread, just take some time and read through it.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
  #27 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

Thanks. Can't hurt. Might help.

- Stephen

Reply With Quote
  #28 (permalink)
 MetalTrade 
 
Posts: 1,055 since May 2010

Can you do the same for multicharts :-)

Reply With Quote
  #29 (permalink)
 
sam1197's Avatar
 sam1197 
Canada
 
Experience: Intermediate
Platform: NT, IB
Broker: IB
Trading: Currency Futures
Posts: 55 since Feb 2011
Thanks Given: 13
Thanks Received: 12

Excellent video.. I wonder why Ninja would not post something similar to help their users. lousy support.

One question, you used your own parameter to optimize on. Is it something I can download and use? Thanks much

Visit my NexusFi Trade Journal Reply With Quote
  #30 (permalink)
 
sam1197's Avatar
 sam1197 
Canada
 
Experience: Intermediate
Platform: NT, IB
Broker: IB
Trading: Currency Futures
Posts: 55 since Feb 2011
Thanks Given: 13
Thanks Received: 12


Mike in this video warn about using the default optimizer and used PH Generic and used his own parameter called _mike_preferred. I searched the forum to find this to download but no success. How can I implement this for my own optimization? Side note: I tried simple optimization for 2 month data, NT7 crashed. I have used my notebook without any upgrades. Is this typical. I am travelling now and this is what I have access to.


Thanks much. I am in the process to upgrade to elite but my paypal acct have been inactive for years. working on it.


Big Mike View Post
In this video tutorial I show how to create a strategy from scratch (not using the wizard, which I never use).

The strategy contains a few optimizable parameters such as SMA length, EMA length, HMA length, three different targets with custom tick settings on each, a stop size, and the option to move target 2 to breakeven after target 1 is hit, as well as move target 3 to breakeven after target 2 is hit.



The strategy is just an example! It took all of 10 minutes to write. Even though it says it made 20k in 90 days over 700 trades, it will likely fail going forward. Simple strategies are usually best, but this one is too simple to work fully automated. Most strategies I write for customers take me hours of work (this one took 10 minutes), so don't just go and copy this strategy and expect good results.

Instead, I created this so you could get your feet wet and learn some of the basics of a more advanced strategy than what Ninja includes with the base install. I also created it so if someone shows you backtest results where it makes tons of money, you can see just how easy it is to produce those results.

Also, don't forget that optimizing based on net profit is virtually worthless. I've spent two years tweaking my custom optimizer type and it considers everything you can imagine such as balanced longs/shorts, trade counts, commission costs, profit factors, expectancy, trade duration, and a bunch of other stuff I don't want to go into because I am not giving it away.

With the normal drop-down list of optimizer types in NT, you don't want to just pick the result that shows the most net profit. You should factor in as many other variables as you can. Unless you're going to do what I did with the custom optimizer, the easiest way is to dump the results to an Excel spreadsheet (feature is built-in to NinjaTrader) and then work some analysis there.

Mike


Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to sam1197 for this post:





Last Updated on October 23, 2020


© 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