NinjaTrader Algo Trading StrategiesBest practices for NinjaTrader Algotrading with indicators and strategies.... Topics include algograding with Futures, Crypto, Forex, and equities/stocks. How do you backtest / optimize strategies with NinjaTrader? You have come to the right place!https://www.nashtech.xyz/Help/NashTech-TrendsCrypto Bot Strategyhttps://www.nashtech.xyz/Help/NashTech-Trends/PostId/12/crypto-bot-strategybacktestingCrypto,NinjaTrader StrategyFri, 10 Sep 2021 19:27:35 GMT<p>I was recently researching specific algo bots for crypto and came across an interesting setup on YouTube…  The setup seems pretty popular and does backtest out pretty well so I decided to develop a free crypto bot for NinjaTrader and offer it to the algo community! </p> <p>The video that I based the algo bot on is below (Note: we are not affiliated in any way with this organization or content, just providing some backstory as to what the setup is based on). <a href="https://youtu.be/xbAQR1e1XY8">https://youtu.be/xbAQR1e1XY8</a></p> <p><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/xbAQR1e1XY8" title="YouTube video player" width="560"></iframe></p> <p><strong>The basics for the setup...</strong></p> <ol> <li>Add the SSL Channel indicator to a one hour chart … Determine the direction from this (I have included a free NinjaTrader SSL Channel indicator in the download / install). The default settings of “10” are ok for the SSL Channel Period but you can change these in the bot if you desire. </li> <li>Add an EMA indicator to a smaller timeframe chart (from his video, a 5 minute chart).  For the setup g from this video he is using a 50 EMA, however you can adjust this within the crypto bot strategy to be any EMA you want. </li> <li>Wait for the price on the 5 minute chart to be below the EMA for long entries, or above for short entries (you can choose to have it crossing or below within crypto bot strategy setup). </li> <li> Choose from any bullish or bearish setups for your entry… Within the video he is going with a Engulfing pattern for entry however in the <a href="#LiveContent[CryptoBot_EntryParameters]">Crypto Bot Strategy</a> you can choose from any of these setups for entry:</li> </ol> <p style="margin-left: 40px;">a.   Engulfing<br /> b.   Harami<br /> c.   Harami Cross<br /> d.   Belthold<br /> e.   Hammer<br /> f.    Hanging Man<br /> g.   Morning / Evening Star<br /> h.   Rising / Falling Three<br /> i.    Three Soldiers / Crows<br /> j.    Piercing Line<br /> k.   Upside Gap Two Crows<br /> l.    Downside TasukiGap<br /> m.  Dark Cloud Cover</p> <p style="margin-left: 40px;"><strong></strong></p> <p><strong>Crypto Bot Strategy (Download Free Below!) </strong></p> <p><a href="#LiveContent[CryptoBot_StratAnalyzer]"><img alt="" src="https://www.nashtech.xyz/DesktopModules/LiveContent/API/Image/Get?mid=744&eid=11&PortalId=0" /></a> </p> <p>I ended up adding several features to the strategy which can provide optional settings... </p> <ul> <li> A minute interval for the higher timeframe (default is 60) </li> <li>Change several other inputs such as the SSL Channel period, EMA, and multiple entry inputs. </li> <li>Trailing stop loss </li> <li>Display the upper TF on the lower TF chart (with this you don't really need to ever pull up the upper TF SSL Channel). </li> <li>Highlight unusual volume (either very minimal or significant) on the chart. At the moment this is only part of the indicator and not the strategy... I am open to input on if anyone thinks these variables would be useful for integration within the strategy. </li> <li>Ability to enable the algo bot on startup, or based only after clicking a button after its enabled. Also individual buttons to manually go long, short. </li> </ul> <p><a href="#LiveContent[CryptoBot_NashTechParameters]"><img alt="" src="https://www.nashtech.xyz/DesktopModules/LiveContent/API/Image/Get?mid=744&eid=13&PortalId=0" /> </a></p> <p><strong>Order Entry Options</strong></p> <p><strong></strong></p> <ul> <li>Optionally only enable long or short entries (or both!)</li> <li>Profit target can be a recent high/low, or standard ticks/currency. </li> <li>Stop loss can be trailing or static number of ticks/currency.</li> <li>Ability to set stop loss to break even after "X" number of bars.</li> <li>Take profit / exit position after "X" number of bars in your direction.</li> <li>Exit reverse candlestick pattern - Will exit on any reverse pattern! </li> </ul> <p><strong></strong></p> <p> <a href="#LiveContent[CryptoBot_OrderParameters]"> <img alt="" src="https://www.nashtech.xyz/DesktopModules/LiveContent/API/Image/Get?mid=744&eid=15&PortalId=0" /> </a></p> <p><strong>Backtesting </strong>- Below is some historical results with ETH... There are also some great results with BTC and others as well.  </p> <p><a href="#LiveContent[CryptoBot_StratAnalyzer]"><img alt="" src="https://www.nashtech.xyz/DesktopModules/LiveContent/API/Image/Get?mid=744&eid=11&PortalId=0" /> </a></p> <p><a href="#LiveContent[CryptoBot_StratResults]"><img alt="" src="https://www.nashtech.xyz/DesktopModules/LiveContent/API/Image/Get?mid=744&eid=12&PortalId=0" /> </a></p> <p>The file is a free download however you do need to register with us to receive the file.</p> <p><a href="https://www.nashtech.xyz/Download-Crypto-Bot"><strong>DOWNLOAD CRYPTO BOT STRATEGY FOR NINJATRADER (FREE BOT!)</strong></a></p> <p><strong></strong></p> <p>Hope this is useful for anyone! Please post comments and any feedback!</p> <p>-Chad</p> 12Epic Bounce with Crypto Futureshttps://www.nashtech.xyz/Help/NashTech-Trends/PostId/8/epic-bounce-with-crypto-futuresCrypto,Epic Collection,Futures,NinjaTrader,Strategy OptimizationTue, 15 Jun 2021 04:21:39 GMT<p>Trading crypto futures with NinjaTrader and Epic Bounce strategy. </p> 8Trading TD Ameritrade / thinkorswim with NinjaTraderhttps://www.nashtech.xyz/Help/NashTech-Trends/PostId/7/trading-td-ameritrade-thinkorswim-with-ninjatraderCrypto,Epic Follow,Futures,MNQ,NinjaTrader,Strategy Optimization,TD Ameritrade,thinkorswim strategy testingMon, 14 Jun 2021 01:50:28 GMT<p>Several customers have been wanting to trade TD Ameritrade / thinkorswim with algo trading and after they initially research this idea... they usually end up in an endless loop trying to backtest using TDA OnDemand (extremely limited), and then they also find out that although Thinkscript is easy to learn and similar to C#, there is no real way to actually enable (at least at this time and likely a while given the Charles Swab merger).</p> <p>So... For these clients some of the suggestions we have been utilizing several setups for Algo Trading with Epic Collection. I do want to point out several pros and cons when algo trading with TD Ameritrade and NinjaTrader:</p> <p><strong>Cons (as far as I know, most of these are all known issues when searching the NinjaTrader forums):</strong></p> <p>1. TD Ameritrade doesn't provide tick data and doesn't seem to work well with intrabar setups where the stop loss might change over time. </p> <p>2. Lots of errors pop up (which seems difficult or I can't find a way to disable) for things such as "no shares to short" messages. We ended up setting up only long setups. </p> <p>3. When an OCO orders is placed with a profit target and stop loss... that cannot be changed throughout the duration of the order. So basically for any setups where you would ever want to change the stop loss or profit target, this is a problem. </p> <p>4.  We initially had problems when we would have hundred plus positions open with the NinjaTrader feature "Close all positions" at a specific time. Basically this would work great with 15 instruments but with 100 it would end up timing out and leaving positions open overnight! </p> <p>We later added code into Epic Collection to set the trading session hours outside of the instrument trading hours. This is helpful for many reasons as there is also the option to flatten the strategy and end it if its running outside of that timeframe.</p> <p><strong>Pros:</strong></p> <p>1. No commissions! </p> <p>2. Sometimes the trades for Epic VWAP or Epic Bid would be in/out over 250+ times per day for over 100+ instruments! Seemed to trade well, especially for setups where the setting was "OnBarClose" and at least a 5 minute or more data series. </p> <p>3. Easily setup similar strategy that would run on percent basis with "Dynamic Quantity" enabled on the Epic Bid or Epic Follow strategy... With this we would run a daily import for specific stocks we wanted to target for the day, import this into a list within NinjaTrader, and then choosing the instrument for the strategy, choose "Select All" for the instrument list. This would end up creating 100+ strategies all with the similar parameters and all we have to do each morning is import the list, create the strategy one time and then right click on all of them and click "Enable".</p> <p>PYPL trades well with Epic Follow... Epic Follow will look for correlation between index's or another instrument and if a major change in the index has occurred, and the same change has not occurred in the master instrument, it will enter in the appropriate direction to "follow" the index. </p> <p> </p> 7Epic Bid - NinjaTrader Algo Tradinghttps://www.nashtech.xyz/Help/NashTech-Trends/PostId/5/epic-bid-ninjatrader-algo-tradingbacktesting,Crypto,Epic Collection,Futures,MNQ,NinjaTrader,Strategy OptimizationFri, 11 Jun 2021 16:56:57 GMT<p><iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/FUeGRWyUCgw" title="YouTube video player" width="560"></iframe></p> <p>Epic Bid, is a strategy which keeps an ongoing bid price for your instrument based on the lowest price of the last “x” bars. You can define optional settings such as price offset (above or below that price). </p> <p> This first video covers only a brief summary of Epic Bid indicator and Epic Bid Strategy for NinjaTrader 8. Please check the blog and comments for upcoming videos on NinjaTrader 8 strategy optimzation and best practices with Epic Bid.</p> 5How to trade crypto's correlated with futures or other instrumentshttps://www.nashtech.xyz/Help/NashTech-Trends/PostId/4/how-to-trade-cryptos-correlated-with-futures-or-other-instrumentsbacktesting,Crypto,Epic Collection,Epic Follow,Futures,MNQ,NinjaTrader,Strategy OptimizationSun, 11 Apr 2021 21:22:00 GMT<p>When we first started backtesting Epic Follow I had high expectations between futures and stocks but I was extremly surprised to see the results that came from backtesting cyrpto against futures (and the other way around). Did a big move in NQ/ES affect Bitcoin? Did a significant move in bitcoin affect the Nasdaq? Surely not.... but wait, it looks like it does! </p> <p>Most of this strategy trades with tickers I am really not used too... Do you guys trade RTY? 6B? ZW? This was backtested from 01-01-21 to 03-10-21 against <a href="http://www.nashtech.xyz/follow">Epic Follow</a> and literally all futures are coming up green, but I typically only trade micros and not sure I have the margin to keep these (although strategy is set to close EOD). It does test ok against MES and MNQ but nothing compared to the others I mentioned.</p> <p>What crypto exchange do you prefer? As we continue to add crypto API's for trading with NinjaTrader, which ones would you prefer to see added?</p> <p>-Chad</p> 4