Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Recommended Posts

Hi Guys,


I'm new here, so I'm going to try to commit some time on how I'm building an automated trading strategy using technicals within NinjaTrader. I consider myself a knowledgeable trader, yet there's always things to learn and discover every day.


These series of articles is to spur discussion and hopefully give some of my trading insights away to the community.


That being said, I'm going to begin with how I identify reversals.


Identifying Reversals


Nothing is easier than to identify amazing trading opportunities looking at a chart in

hindsight. As we all know, doing the same in real time is a different ball game. In the

chart below (showing the ES-mini of last Friday, March 19, 2013) I marked, in hindsight,

what would have been some good entry points, either on the long or short side. Wouldn’t

it be nice if we could spot some of those opportunities as they occur, in real time?



ES1 by TraderFrank, on Flickr


To find out, I employed my favourite tool for the past year or so, Bloodhound from Shark

Indicators. (Bloodhound runs on Ninjatrader).


I started out by trying to define what seem to be some of the common characteristics of

the situations marked on the chart in yellow. I’ve found the following:


  • most yellow circles contain candles with long tails and/or long candles with no tails at all
  • good long entries start with an up candle and vice versa
  • the candles in yellow are close to the opposite Bollinger (2,20) lines (lower line for longs, upper line for shorts)
  • the MACD is below 0 in the case of long signals and above 0 for shorts


Let’s see how we could define these rules in Bloodhound. (For our exercise, I’ll assume the reader is somewhat familiar with Bloodhound, and has a basic understanding of the Solvers and the Logic and Function nodes).


First, let’s define long bottom tails with the Indicator Comparison solver by comparing the Low to the Open of the current bar. More precisely, we’ll want to find candles where the Low is “much lower” than the Open. (Note: price data can be accessed through SIChameleon, a Bloodhound component, on the indicator list). A welcome suggestion from Zac White of Shark Indicators to use the ATR measurement unit to identify candles with long tails allows us to create a signal that will work on all types of charts, whether they’re range, tick, renko, or time charts. And by setting the ATR period to 1, we effectively tell Bloodhound to evaluate the current candle only. Very useful.


See the settings below.



Settings 1 by TraderFrank, on Flickr


Notice how we define “much lower”: while we could use the default Ticks as measurement unit, by using a 1 period ATR with a Value of 0.5 and the Long Output setting as shown, we are telling Bloodhound to mark any candle where the Low is at least 50% lower than the Open. (The 0.5 setting, of course, is not written in stone. E.g. a setting of 0.33 would mark bars whose tail is at least one third of the whole candle.)


After adding a Bar Direction solver to our logic, we would get this:



Settings 2 by TraderFrank, on Flickr


Now let’s say, I only want long candles with no top tail: no pullback, just sheer momentum. I can do that by adding another Comparison Solver with the setting Close=High (Opposite settings for shorts).


So far so good. But what if I also want to include long candles with no tail at all? They definitely indicate momentum. ATR, again, comes to our help: the Comparison solver with the Open<Close by 1 ATR setting will spot long green bars with no tails.


No let’s see how we could put all these ingredients into a logic.



Settings 3 by TraderFrank, on Flickr


Now, since we are interested in long bottom tails with a MACD<0 and Low<BollingerLower setting, we can add an If Then filter to the equation.


The logic, with the mirror code for shorts added, will look like this:



Settings 4 by TraderFrank, on Flickr


Looks complicated at first sight, but if we read the chart step by step, it’s quite easy to follow the logic.


Finally, let’s see what signals this code would give us for the ES on March 19, and compare it with the “ideal” signals above.



ES After by TraderFrank, on Flickr


Not bad at all. While a signal or two are clearly misses, the majority of the “racing lines” seem quite usable.


Now up to the next steps: fine-tuning and backtesting, then defining some sound money management, not to mention controlling nerves. But those must be topics of future articles.


Happy experimenting and successful trading to all!

Share this post

Link to post
Share on other sites



Thank you for taking the time to post this. I certainly appreciate the detail you used when working through the triggers. I will be curious to see how the backtesting and money mgmt portions either show this to be a productive (profitable) system or not. The details are where the edge will be flushed out or not.


Again, thanks for your effort and keep up with your great post.

Share this post

Link to post
Share on other sites

Hi guys,

in the past week or so, I experimented with the Bloodhound code described in Part 1.


I ended up with a version that is only slightly different from the one included in my first article. I implemented one modification (the Signal Blocker function node) just to get rid of multiple signals firing off consecutively, thereby making the chart a bit cleaner. The second modification was to include a Time Solver since I will not want to have signals before 7am and after 3.50pm. I also changed the setting for Bollinger to 2.5/20, to spot the most extreme cases (and to trade less). The third modification is also material: I changed the 0.5 ATR setting to 0.33ATR, thereby including candles whose third is made up of the tail. The reason being that I backtested the code with both settings (for 90 days), and the 0.33 version resulted in more profit. More about that later. First, here’s the latest version of the ‘Long Tail’ code:



Article 2 Chart 1 Long Tail by traderfrank2013, on Flickr



I know, it seems overwhelming first (it did for me). What I do with these long codes is that I disconnect most things, and connect them again one by one to see which Solver/Node/Function does what. Watching the changes in real time on the chart makes it easy to follow the logic.


Now, before I tell you about the backtesting results, a few ’tips and tricks’ that I find useful in Bloodhound, and which may be of interest to some of you as well.


Let’s say, I like this code, I tested it, I got to trust it, I made it mine, etc. But let’s say, I’m a discretionary trader at heart and I want to place the trades manually, albeit based on the signals Bloodhound gives me. Also, I recognize that no system is perfect, and there may be market conditions in which I do not want to place trades (although I may get signals), or I only want to place trades in a certain direction (although the code would give me both long and short signals). Here’s what I do:


On Bloodhound’s Logic tab, I click on Copy to make a copy of this logic. Then I disconnect the short signal and save the code with the name Long Only, like this:



Article 2 Chart 2 Long Only by traderfrank2013, on Flickr


Then I do the same for shorts. Then, I disconnect the line between the last Or and the Result, and save it as No Trade.


What I’ll get in the chart will be a Bloodhound drop-down list, where I can manually choose what type of signals, if any, I want to get on the chart. For rule-based manual trading, it’s quite handy.


Now, to backtesting the code. To start, I right-clicked on the chart to select Data Series, and set Days to Load to, say, 90. I also checked that the Show Chart Trader setting is off (false). Then right-clicking on the chart, and selecting Strategies, I double-clicked on SiRaven, the simple strategy manager included with Bloodhound. I chose Long Tail (that’s the name I gave to my code). I experimented with various target and stop/trailing stop settings but none of them produced a profit, until I tried a little trend indicator gem (available from BigMike, I believe), called TCTrendingTSF. Worth checking it out.

I added an Inflection Solver using TCT, as shown below, making sure I choose the Signal Direction setting to tell me when it changes color (as opposed to the slope).



TSF setting by traderfrank2013, on Flickr



Next, I created a very simple new logic, shown below, and named it Exit.



exit by traderfrank2013, on Flickr


I did all this, because I wanted to specify an Entry Logic as well as an Exit logic for my strategy, like this:



strategy exit by traderfrank2013, on Flickr


(Also, I chose ‘True’ for Enter Only When Flat, to stay in the trade until the exit signal arrives.)

Here’s a few trades. Notice that exits are triggered by the TCT color change.



trades by traderfrank2013, on Flickr


Now with the strategy running on the chart, right-click, choose Strategy Performance/Historical to see the backtesting results. I got this:



backtesting results by traderfrank2013, on Flickr


Mind you, it’s not out of this world, and clearly, more work is needed if we want to run something like this automatically. My exit is pretty crude, too. By exiting manually, either by taking a quick and small loss or a better profit, for example, the results could probably be much improved. I will certainly play around a bit more with a more sophisticated, rule-based exit strategy in the coming days. As is probably apparent, I’m still very much getting acquainted with Bloodhound, and there’s a lot more to be discovered. It would be fun to hear how fellow traders use this tool, as well!


Until next time, I hope I managed to demonstrate, to myself and to you, that it is possible to create a profitable, though admittedly at this stage, rather unpolished, strategy with Bloodhound. I also hope there will be readers who’ll find some of the above steps I used useful when working with Bloodhound.




Till next time, happy trading to all!

Trader Frank

Edited by traderfrank
pictures are not showing up

Share this post

Link to post
Share on other sites

Hi to all,

welcome to part three of my article on trying to devise an “automated” trading system with Bloodhound. I should mention that by “automated”, I mean “to a large part, automatic”, meaning there may be some limitations to fully automated trading, namely:


• the system would never be run unattended

• the right would be reserved to use the drop-down menus created for long and short entries and/or for ‘no trade’ periods (see previous article) to filter some or all of the signals if, in the trader’s opinion, market conditions so require

• while entries would be handled by the Bloodhound code, the trader may choose to exit manually from ‘hopeless’ trades.


So with the above out of the way, let me refer back to the strategy created in the previous post. As you recall, it made $500 in 90 days. (I should mention that, initially, for weeks and weeks, I was not able to devise a system with Bloodhound that would bring a positive result in automated mode, so I regarded that $500 system as a big achievement when it was done.) But as I learned more about the product, I wanted to see if I could tweak the code to improve on that first humble result.


Here’s the new, slightly modified version of the code. Let’s call it the final version of the ‘Long Tail’ idea:



Article 3 Chart 1 by traderfrank2013, on Flickr


I played around with various versions of the same basic idea to see how much I can improve on the results. I tried about 20 slightly different codes, until I ended up with the one above. Interestingly, the “winner” is not that different from the version in Article 2. The main difference is that I extended the signal for a few more bars (8, to be precise) so that I can use the TCT filter with a setting of 30 and a lookback period of 10. (I mentioned TCT, a type of trend indicator, in the previous article). What I wanted to achieve was that by creating an ‘overlap’ of the base signal and the TCT, I can use the latter to filter out the not-so-good base signals, and keep those that are supported by the TCT. (The overlap, I do recognize, introduces a delay, so by entering later, I know I give up a candle or two but I hope to get a more reliable signal.)


The above picture shows both the long and short signals, but of course, the Short Only and Long Only drop-down options (for manual or semi-manual trading) can easily be created, as described previously.


To make a long story short, here’s the result of the 90-day backtesting of this code:



Article 3 Chart 2 by traderfrank2013, on Flickr


You’re right: it’s 18 times better than the version in my previous article! See the promising equity curve as well:



Article 3 Chart 3 by traderfrank2013, on Flickr


And the weekly results:


Article 3 Chart 4 by traderfrank2013, on Flickr


While two of the weeks kind of stand out (one big loser, and one big winner), frankly, it’s better than anything I expected.


Let me also attach the strategy settings that produced this result. (As mentioned, I tried various other strategy settings and versions of the code, but even the second best “only” produced $2000. So here are the winning settings:



Article 3 Chart 5 by traderfrank2013, on Flickr


As you’ll notice, this is an ‘always-in-the-market’ system, subject to the time solver restriction built in the code. I didn’t really plan it this way, but any exit idea I’ve tried resulted in much less profit (although they were mostly positive). The code/strategy combination above simply stood out from the rest.


Before we move on, we have to look at the drawdown stats. What pain must we bear while executing this strategy? See below:



Article 3 Chart 6 by traderfrank2013, on Flickr


Better than I thought. Now, whatever the results, it is clear that this code/strategy setting combination, like any other, generates a lot of losing trades. Some of them are trades that we would never take manually if we were in control. The same goes for the exits. Since there’s no stop loss specified, the code makes us stay in ‘hopeless’ trades for much too long. (But please note, our largest drawdown in 90 days was a manageable amount.) So with some manual control, the degree and manner of which is up to the individual trader, I assume it would be possible to improve on the results. Also, the more than 4 trades/day may be a bit too many for some of us. Again, either some manual discretion may be applied when entering trades (by using the No Trade drop down menu in unattractive trading situations), or the Time Solver’s settings may be modified as desired to limit the trading period, thereby reducing the number of trades.


In the coming days, I’ll have this strategy running in demo mode on one of my charts, to see if the forward testing results measure up to the data above, and also to gauge, what degree of manual interference I would prefer to apply if I ran this with real money on the line.


Finally, here’s some chart action from today’s ES session to demonstrate the workings of this system:



Article 3 Chart 7 by traderfrank2013, on Flickr


Well, in the past week or so, I certainly learned a lot about how to use Bloodhound to create something useful. I’m especially glad that I was able to improve significantly on the respectable, but rather mediocre results of the code in Article 2.


With this third article, I think I’ve covered this initial phase of what I found Bloodhound could be used for. I’m sure there’s many more ways to use this product. I’m still mostly learning how I could put it to good use in my live trading. I do recognize the potential benefits of the various degrees of automation, and this is what made me interested in this product in the first place.


As always, I look forward to your comments and experience with using this tool.


Thanks for your attention and happy trading to all!


Trader Frank

Edited by traderfrank
Pics didn't show up/spelling

Share this post

Link to post
Share on other sites

I really appreciate that you took your time and create this post. I have been in this sector for long time and i saw lots of automated systems but fortunately and unfortunately i never saw a single trader who sustain in this market using only automated system. I would like to suggest to all that if you really want to sustain in this market then you need to understand and analyze this market closely. If you can't addressed this type of mistakes initially then you will have face to face with unpleasant reality.

Share this post

Link to post
Share on other sites


I've just discovered your post today and have found what you've written to be so helpful. Thank you so much. I am in the process of getting started with SharkIndicators, just reading your posts have helped my understand the functionality of SI so much better.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Topics

  • Posts

    • GBPUSD Continues To Faces Corrective Recovery Risk   GBPUSD continues to face corrective recovery risk as it eyes further bullishness. Support comes in at 1.2100 with a turn below that level shifting focus to the 1.2050 level. Further down, support resides at the 1.2000 level where a break will turn attention to the 1.1950 level. Further down, support lies at the 1.1900 level. On the upside, resistance stands at the 1.2200 with a turn above here allowing for additional strength to build up towards the 1.2250 level. Further out, resistance stands at the 1.2300 level followed by the 1.2350 level. On the whole, GBPUSD retains its corrective upside pressure    
    • havent done any crypto withdrawals or deposits, maybe support can answer that... Im more if a traditional trader, straight up regular connection tbh. 
    • Date : 19th August 2019. Events to Look Out for This Week. Trade worries remain and are expected to keep flip-flopping between risk-off and risk-back-on sentiment. Hopes for more central bank stimulus vies with fears that a number of major economies are simultaneously heading for recession, with a number of developing-world economies with high Dollar debt levels particularly exposed to the shifting financial cycle. Given these fears, further conciliatory remarks are likely from both China and the US with regard to their trade spat. Nevertheless, next week the economic calendar also focuses on the PMI releases globally.Monday – 19 August 2019   Consumer Price Index and Core (EUR, GMT 09:00) – The Euro Area CPI for July is expected to hold at 1.1%y/y in the final July reading from 1.3%y/y in June. Energy price inflation was clearly largely to blame and the core rate fell back to just 0.9%y/y from 1.1%y/y in the previous month. The core is anticipated to remain unchanged as well. With growth slowing down and the improvement on the labour market starting to fizzle out, chances are that inflation will continue to undershoot the ECB’s target range, thus adding to arguments for a comprehensive easing package in September. Tuesday – 20 August 2019   Monetary Policy Meeting Minutes (AUD, GMT 01:30) – The RBA left rates on hold in its last meeting, after back-to-back rate cuts in June and July, which put the cash rate at a record low of 1.00%, while Governor Lowe said that more easing measures could be needed. Minutes are expected to shed further light regarding future easing stance. Manufacturing Sales (CAD, GMT 12:30) – Manufacturing sales are anticipated to grow 2.0% in June after a 1.6% rebound in shipment values was revealed during May and following a 0.4% decline in April. The surge in transport equipment sales is consistent with the improving economy and as such fits with the BoC’s overall view that the economy is improving after temporary weakness in Q4/Q1. Wednesday – 21 August 2019   Consumer Price Index (CAD, GMT 12:30) – Canada’s CPI did not challenge the outlook for steady BoC policy this year. CPI slowed to a 2.0% y/y pace in June from the lofty 2.4% y/y clip in May. Inflation remains around the 2 percent target, with some recent upward pressure from higher food and automobile prices. Core measures of inflation are also close to 2 percent. Even though CPI inflation will likely dip this year because of the dynamics of gasoline prices and some other temporary factors, the annual and monthly numbers for July are expected to remain steady. As slack in the economy is absorbed and these temporary effects wane, inflation is expected to return sustainably to 2 percent by mid-2020. FOMC Minutes (USD, GMT 18:00) – The FOMC minutes, similar to the ECB Reports, provide an assessment as regards the views of the Fed’s policymakers about the interest-setter’s future stance and are usually a cause for FX turbulence. Thursday – 22 August 2019   Jackson Hole Symposium – Day 1 Services and Manufacturing PMI (EUR, GMT 07:30-08:00) – July PMI readings highlighted manufacturing weakness. This picture is likely to be seen again in the preliminary readings for August, as Manufacturing PMI has been forecast at 46.3 from 46.5 last month, still down from 47.6 in June, and indicates a deepening recession in a sector that has been hit very hard by global trade tensions and no-deal Brexit risks. Meanwhile Services PMI is expected to fall to 52.7 from 53.2. Services and Manufacturing PMI (USD, GMT 13:45) – Preliminary Manufacturing are expected to grow in August, to 51.0 from 50.4, as Services PMIs are likely to fall to 51.7 from 53. New Zealand Retail Sales (NZD, GMT 22:45) – Usually considered an index of consumer confidence and overall consumption in the economy, higher retail sales point to higher consumption and hence higher economic growth which is good for the currency. Friday- 23 August 2019   Jackson Hole Symposium – Day 2 Retail Sales ex Autos (CAD, GMT 12:30) – Retail sales are expected to have decreased in Canada, with consensus forecasts suggesting a -0.5% m/m decline should be registered in June and an unchanged ex-autos component at 0.3%. In May, Retail sales were disappointing, falling 0.1% for total sales and declining 0.3% for the ex-autos component. The decline in sales was driven by a 2.0% tumble in food and beverage stores. The report casts some doubt on the resiliency of the consumer sector to the ongoing parade of worrisome geopolitical and trade developments. Always trade with strict risk management. Your capital is the single most important aspect of your trading business.Please note that times displayed based on local time zone and are from time of writing this report.Click HERE to access the full HotForex Economic calendar.Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE!Click HERE to READ more Market news. Andria Pichidi Market Analyst HotForex Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • AUDUSD Market Dragged Lower on Bears Dominance   AUDUSD Price Analysis – August 15 The bears were in full control moving the market lower in the prior session, although in the present session we see the pair found buyers around the level at 0.6748 for the 4th day in a row while the pairs bear dominance is evident falling to lowest close since the beginning of the year.   Key Levels Resistance Levels: 0.7297, 0.7207, 0.7085 Support Levels: 0.6748, 0.6676, 0.6620   AUDUSD long term Trend: Bearish In the bigger picture of the daily time frame, the decline from the level at 0.7207 (high) is seen as resuming the long term downtrend from 0.7297 (February high). Firm break of the level at 0.6876 (low) should confirm this bearish view.   On observation, further fall may be seen to the level at 0.6620 (low) next. On the upside, the break of the level at 0.7085 resistance is needed to be the first sign of medium-term bottoming. Otherwise, outlook will remain bearish even in case of a strong rebound.     AUDUSD short term Trend: Ranging On the flip side of the 4-hour chart, the AUDUSD is staying in consolidation from the level at 0.6676 and it’s intraday bias remains neutral first. On the upside, the break of the level at 0.6827 will extend the rebound.   But upside should be limited below the level at 0.6909 support turned resistance to bring fall resumption. On the downside, the break of the level at 0.6676 may target 100% projections from the level at 0.7085 to 0.6827 from 0.7085 at 0.6620 level reflecting on the daily chart.
    • EURJPY Approached Recent Swing Lows, Likely to Breach the Low of the Year on the Level at 117.50   EURJPY Price Analysis – August 16   The pair depreciated again in value against the Japanese Yen. The currency pair during the mid-week breached both the upper and lower horizontal lines on the moving average 5 and 13 while completing another lap on the low in today’s session towards the low level at 117.50.     Key Levels   Resistance Levels: 123.01, 121.40, 119.91   Support Levels: 117.50, 117.00, 114.84   EURJPY Long term Trend: Bearish The Daily time frame displays the EURJPY at the low, showing the pair is also testing a swing area on the level at the 117.50 to the level at 118.16 below the moving average 5 areas. The price attempted to dip below the area on August 12 to the low for the year on the level at 117.50, but could not keep the momentum going. The swing area was reestablished as support on August 13 and again today   However, buyers are trying to lean against the low level at 117.50, on the retest and hoping for a quick bounce. The trend is showing a bearish outlook in the medium and long term.   EURJPY Short term Trend: Ranging On its Intraday, the bias in EURJPY remains neutral for the moment. With the level of 119.91 minor resistance intact, further decline is in favor. Although a break of the level at 117.50 will resume a large downtrend to the level at 114.84 support next.   However, on the break of 119.91 resistance will indicate short term bottoming. A stronger rebound should be seen to the horizontal resistance line now at 121.40.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.