System Messages

This forum is for members of the Apiary Investment Fund. To learn more about how to get involved,
sign up now for a 14 day free trial or fill out the form below and preview the training right now!

Alignment Trading Strategy & innovative new Indicator

 
Back to Forums
 
 
t5tonym

Alignment Trading Strategy & innovative new Indicator

Anthony (Tony) Morland

My Apiary Trading STRATEGY. Updated version 02 (3rd November 2018).

Please note: This is my own personal trading strategy, as currently implemented for my own personal use. I do not necessarily expect anyone else to like it, or to agree with it, or to use it. I am not trying to compete with or to convince anyone else here, and if you don't like it then I really don't care. However if you do find this useful or have any genuinely constructive comments, then please feel welcome to make them. Thanks.

Securities in my tradable universe = all FX pairs involving the 8 Major currencies = {AUD, CAD, CHF, EUR, GBP, JPY, NZD, USD} = 8*7/2 = 28 items, plus XAUUSD (gold) & XAGUSD (silver) vs USD. Any of these pairs that are either of relatively low liquidity, or are not available as Apiary-traded pairs (e.g. AUDJPY), or have larger that the median values of Bid-Ask spread (measured either in pips or in % of price), or have smaller than the median value of ATR, or smaller than the median ratio of ATR/spread, or are highly correlated > 0.80 (see separate research) are removed from further consideration. This leaves the following pairs as my personal set of trading candidates with the best liquidity and potential profitability characteristics. 14 currency pairs: {AUDUSD, EURAUD, EURCAD, EURCHF, EURGBP, EURJPY, EURUSD, GBPJPY, GBPUSD, NZDJPY, NZDUSD, USDCAD, USDCHF, USDJPY} and also gold (XAUUSD).

Every trading day for me starts with a review of the price action of these 14 currency pairs (plus sometimes gold as well). My aim is to determine their current trending characteristics, as per the Apiary “Alignment Strategy” document. Due to the fractal nature of financial security (such as currency) price movements in general, there is not usually one single entity that can meaningfully be called “THE trend”, but rather a whole collection of sub-trends of different strengths and directions over different timeframes. What I am seeking is to identify those pairs (from my selected set of 14 currency pairs) which on the day have trends over multiple different timeframes that are as consistent as possible in direction. On any particular day, some pairs may have no clear trends at all, some may have a complex mix of up and down trends at different times and timescales, whereas some may have a general clear and dominant trend direction over different timescales. Those are the pairs that I want to trade in the direction of the predominant trend. It is rare that either all or none of the pairs are good clear trenders. Sometimes it happens, but usually, on most days, about half of my 14 potential candidates have a clearly dominant trend direction, as determined visually by examining all of their charts on a 1-day, 4-hour, 1-hour, ¼-hour, and 5-minute bar timescale.

This pre-trade review is one of the most important parts of my trading day and my trade methodology. For each of the pairs in which I can clearly identify a predominant direction, I mark these as Green (for predominantly Up, and potential Buy only) or Red (for predominantly Down, and potential Sell only). This predominant direction is what I also call the “Always-In” direction for the day such that, if I really had to be in a position either Long or Short and to hold it, then this is the direction in which I would want to be holding the trade. In fact I may not always choose to be in a position in any of the finally-selected pairs, but if I do enter, then I will ONLY enter in this “Always-In” direction. I do NOT take counter-trend trades against this predominant direction (except very occasionally with small positions and under extreme over-bought over-sold conditions), as I consider that such Counter-Trend trades have excess risk. I am looking to generally enter only the best, lowest-risk trades.

Sometimes the predominant direction does completely reverse during the trading day, for example at a major market top or bottom, but generally on most days this is not the case. More usually, the quality of the trend simply degenerates, the predominant direction becomes no longer clear, and then the pair in question simply falls off my list of trading candidates for the remainder of day. If there were no remaining “dominant trend” pairs on my list at all, then I would discontinue trading for that day.

Having established these initial constraints as to which pairs I will trade (each pair either ONLY Long or ONLY Short) for the day, then the entry signal is the easy part. Given the “best” currency pairs for the day, and only one “allowable” direction for each pair so as to give minimum risk and highest probability of success, my entry can then be very flexible and based on any one of a number of possible triggers. These include any of the following: range breakouts using On-Stop entry orders, pullbacks & reversals back into the prevailing trend direction, breaks above old minor highs or below old minor lows, or even just beyond the high or low of the previous bar if the pair is trending strongly. Entry is either On-Stop or sometimes At Market. I may also seek confirmation for entries using my own personally-developed Price Action indicator(s), just to ensure that I have not overlooked something or accidentally violated any of the necessary conditions of my Alignment Strategy.

After this, the only other major decision variables are the sizes of the SL & TP, and the trade position size. SL and TP are based on the ATR for the timeframe over which I anticipate the trade to continue, and the position size is based on my allowable risk as a percentage of account, as specified in detail in my Trading Plan.

The major problem with implementing this Trading Strategy was the degree of subjectivity and the length of time involved in determining the (usually ambiguous) “dominant trend direction”, as per the Apiary “Alignment Strategy”. In order to reduce subjectivity and to facilitate rapid and consistent decision-making regarding the “dominant trend direction”, I am currently in the process of creating and testing an innovative “Alignment Direction” Indicator for this purpose. As with other indicators that I have created for my own personal use in the past, this new indicator features very small lag, as well as a clear and unambiguous output signal for very easy use in live trading even under difficult and stressful conditions. Generally however, for me, trading is an enjoyable and relatively low-stress experience.

Upon completion of the indicator as discussed here, I will release it on the Forum for free use by Apiary colleagues in their own trading.

Sat, 11/03/2018 - 2:43pm
 
t5tonym

Attached screen image of "Alignment Direction Strategy Indicator". Green & Red = Buy / Sell based on predominant Alignment direction = Up / Down. Light green & pink = Don't enter, but possibly continue to hold Long / Short respectively. I wrote the code for this in AFL language and implemented on a different platform (NOT Alveo or MT4/5), so now I just need to convert it to Alveo/C# for use in Apiary / Alveo. The chart shown is EURUSD with Daily bars but, when I finish converting it, the indicator will work on any Alveo chart timeframe (..... IF Alveo itself is working of course! ;-))

AttachmentSize
Alignment_Strategy_Indicator_2018TonyM.pdf 63.46 KB
 
t5tonym

Looks like apparently no interest at all from anyone for this ... oh well, too bad!

 
Rookie

Don't feel bad T5.. it happens to the best of us.

 
Ronconomics

I'm doing much the same as you ..prioritising trending pair opportunities and focussing in during the day. I'm using multiple time frame alignment of the hma D H4 H1 for visual clues on the lowest time frame chart. Timing is on pullbacks on M15 once I have a congruent set up. I've added a momentum filter to help with seeing these (it's spots low volatility too as an alert ) . I can use pretty tight stops and let trends play out for a good ratio. I'd be interested to see what you come up with for alveo as I'm analysing on trading view (one pair chart and 3 indicators are free) and executing only on the alveo platform. it seems to work.

 
Ronconomics

how are you doing your correlations please ? what time frame and what base pair are you using ? eg aud usd , EUR jpy, gbp usd , nzd usd , are all 87 to 97 % positively correlated to eurusd on the daily . usd cad usfchf usd jpy are all 81 to 99% negatively correlated similarly.

 
t5tonym

Hi "Rookie", nah, the only thing i feel bad about is the results of my last 2 days trading ... but as i DO know why, actually that's not too bad at all really. Just another lesson from Mr. Market ;-))

Hi @Ronconomics. Yes, I think this is a good way to go. Conventional indicators cannot really do it at all, so it needs something innovative, in particular a set of decision logic that uses a comprehensive set of simple rules, examines all the aspects of what we do visually, but doesn't forget anything. I have spent a lot of time developing unconventional indicators. To me, a good "indicator" is a piece of code that says simply: "Buy / Sell / Hold (Long or Short) / Avoid", based on something that is as close as possible to what i would do manually, but doesn't get tired or make silly mistakes! A year ago, as an experiment, i spent several months day-trading futures using Price Action concepts only, without any indicators, just to see what would happen. What i found was that when there are good clean trends it is incredibly easy to make money. However if the market either becomes trendless or too noisy (i.e. the trends are of poor quality), then it's also incredibly easy to just give all that money back again. My conclusion was that it is best to be very selective, watch & wait, and just stay out until market conditions are really good. This year, I find that Apiary's "Alignment Strategy" tells me much the same thing. So now i am trying to focus on developing an algorithm to identify consistent trend quality over multiple timeframes. Some days some pairs just cannot provide that, hence the need for proiritizing pairs, as we both agree. The challenge is to satisfactorily quantify "trend quality". In addition to consistent direction over multiple timeframes, the trend also needs to be moving sufficiently fast relative to the amount of noise present, so you are absolutely correct that momentum is an important part of it. Cheers, all the best, TonyM.

 
t5tonym

Correlation calculation results in general are very sensitive to both a) the data discretization interval = bar size (min, 5 min, hour, day, etc bars) and b) the calculation window length = number of bars used. If i were actually constructing a correlation indicator, then i would use multiple different bar sizes and multiple different correlation window lengths, and then aggregate the results systematically. However, for this specific application, i think there are other far more important issues (especially trend QUALITY over multiple timeframes), so my investigation of correlation here was brief and was designed simply to reduce the number of candidates for further evaluation. Apiary/Alveo offers about 30 pairs, and i wanted to cut this by about half to reduce the workload in visual trend examination.

I looked at correlations between all available PAIRS of PAIRS of currencies (e.g. NZDJPY vs USDCHF, AUDCHF vs GBPUSD, etc) on 5min, 1hr, 4hr and 1day intervals, calculated over 50 periods (bars) using the data from MATAF, see https://www.mataf.net/en/foprex/tools/correlation. In any cases where there were several different sets of highly correlated pairs, especially on the 1day-bar timeframe, i then only kept whichever pair had the highest liquidity, lowest bid-ask spread, and highest ratio of ATR to bid-ask. Following this procedure, i managed to reduce the number of "best candidate" pairs from 30 to about 14 or 15. This cuts down subsequent work, but is not really essential. My aim was not to find "uncorrelated assets" because, as you observe, they are not. Trend quality and correlation between pairs are not necessarily related at all.

We are both, i believe, looking primarily for trend quality. If you are interested in correlation studies then, rather that looking at correlations between pairs, take a look at correlation of price with bar number for each pair separately. This is a nice easy way of quantifying trend smoothness or roughness = noisiness, which is not quite the same thing as volatility. All other things equal, the "best" trend is the smoothest one, which has the highest absolute value of correlation with a linear ramp, which is the same thing as correlation of price with bar number.

Cheers, all the best, TonyM.

 
Rookie

@T5, I trade correlations the easy way, I used to just use a website table, now refined tot he USD and its related USD pairs. Trading off the index just eliminates all the work. That said I now mostly just trade the EU and GU.
My question for you is how many pips per day is your target? or as soon as you hit Gold it is the percentage of daily equity?
Why do I ask that? most traders myself included in that group start out broad-based without much focus.

If a pair has enough daily movement how many do you need to study, follow, track, trade.

 
t5tonym

Hi Rookie, i have done lots of work with correlations in the stock & futures markets and there are many different things that i have done with them (some useful and some not) over the years, but i'm still new to FX. Perhaps i will learn something quite different about FX correlations when i get to Gold Level, but at the moment i do not understand what you mean when you say that you "trade correlations". What exactly do you do with them?

I have been trading for a long time, and i'm always trying to improve my game, so nothing that i do is "cast in stone", and i'm always open to change my ideas later if i find something better, but as for targets i currently have two separate perspectives. 1) Targets on individual trades = TP pips: This is something that i base on ATR for each instrument. 2) Target pips per day is something that i do NOT do, and do not intend to do. The reason is that, at best, and even in theory, I can at most only squeeze out of the market what the market has to give at the time. Some days are good trend days and some are not. When the markets are trending well, i like to trade until i get tired or until my wife or my kids want me to do something else with them. On good "trendy market" days I will take as much as i can. On other days, when there are no good trends and the market price fluctuations just look like "noise" to me, then i would prefer to stay out an make nothing at all (but at least not lose anything either). If you want a number, then some days i do say "why stop at 200?", and on other days i say "hey, i'm glad to get out of this after 20". I cannot force the market to do anything, so to me the idea of a specific daily target every day doesn't make much sense. On the other hand, if you are asking what i think would be a "good target for average days?" then honestly i don't know yet. I have not had enough experience in FX with a stable system that i'm really happy with yet. So, I'm still experimenting. Ask me again in a year and maybe i will be able to tell you what is my daily pip target, if i have one. I'm not being evasive, but this has nothing to do with focus.

How many pairs do i need? To TRADE, only one at a time really. If one pair is trending nicely then i would just be distracting myself (and sometimes foolishly i do that) by jumping around, and it never helps. However to find which pair is the best candidate at any given time on any given day, i obviously need to watch more than one pair. The full set of all pairs available in Apiary / Alveo is too many to watch, and some have relatively poor liquidity and some have bid-ask spreads that are too wide, so i ignore those altogether.

 
t5tonym

Well goodness! I just finished writing above: ."... when i get to Gold Level, but at the moment ... " (i.e. i'm still Silver), .... and then i went to see what my kids were watching and have a bite to eat, and when i came back i find that i am now Gold I. Amazing that SiverIII was just sooo easy and effortless .. except for that painful Alveo .... but enough said about that elsewhere already!! ;-))

 
shinkee

I'll say you shouldn't feel bad for your results as well. As far as I know, many indicators only work well in a channellized-trending market, and not so well in a choppy market. Obviously past few days the market has been really choppy.

 
t5tonym

Hi shinkee. I see on your profile that you are living in Australia, which is where i'm from originally, but Australia is just so expensive these days. Now I enjoy a very happy life here in Penang. Much better value!

Thanks for your encouraging comment about the market. Good to know that it's not just me. Actually, I thought the last few days LOOKED deceptively easy, but then my statistics turned out terrible for two days!!

Regarding your comment about conventional indicators, yes i agree. Some (e.g. MA, etc) work well in trends, and some (e.g. oscillators) work best in cycling markets when there are no trends, but really none of the conventional indicators work very well in choppy markets. I have had a lot of experience designing UN-conventional indicators to handle choppy, noisy markets, but i'm still trying to get them to work in Alveo.

Cheers, very best wishes to you, TonyM.

 
Rookie

t65, This is a very big question.
I generally trade only two highly correlated pairs, EURUSD & GBPUSD. That's good for at about 100 pips per session useing 5M. depending on your account equity and lot size you should make right at 1%.

When trading these two they more or less move in lockstep, today is a little bit mixed. I will also usually take two positions per pair at the same time but in a strong market up to four positions each. (not in prefund or G3 L1).

Now you just as easily trade a basket. for instance all USD pairs. Essentially all XXXUSD go one way and the other USDXXX go the other way. I use the USD index to tell the tail. The %DXY is my indicator. I used to trade the basket but it became too hard for my mind to track all the pairs, invariably one would get away and kill my stats for the day.

See the DXY threadhttps://apiaryfund.com/forum/trading-us-dollar-index

While I trade the 5M to 1H your can just as easily trade higher time frames.
-----------------------------------
Here is a thread the Lindsey started that got me to use the DXY index.
As an investor your most likely familiar with commodity correlations.
https://apiaryfund.com/forum/how-currency-cycle-correlates-cme-group-equ...
I just applied the Kiss principle.
-----------------------------------------------------
There are a few good sites to get correlations from one of the better ones is
https://www.mataf.net/en/forex/tools/correlation
On this site, the account is free to sign up and after that, it will save your watch list,
also, check out the forex/tools page, my fav is the currency index tool.
---------------------------------------------------
disclaimer, my own opinion.
For what it worth I think a lot of folks try and make stock market investing mentality work in forex
in forex there is only sentiment + momentum = trend.
https://apiaryfund.com/forum/sentiment-momentum-trend

On the lower time frames, patterns don't really matter just consolidation and expansion.

Higher time frames are a slightly different ball game where pice action location is most important.
In forex, we are not investors but traders adhering to a different set of rules than investing.

 
t5tonym

Thanks @Rookie for your comments above.

Development and testing of the indicator is continuing. The work is being conducted in two parts, namely short-term = less than about 20 bars, and longer term which is > 20 bars. The short-term part is concerned with the most recent multi-fractal and noise-vs-trend behavior. This is somewhat different to the longer-term trend-related part (work-currently in progress) that is described by Apiary's Alignment Strategy document.

The two parts should complement each other very nicely and will be combined after completion of both. Preliminary results from testing of the short-term part alone have now been obtained and are documented in the attached two files (text and screen image that replaces the earlier trial version). Some of the results were a little surprising, and very pleasantly so in the case of any currency pairs containing JPY.

Basically it appears that, within the limitations and constraints explained in the attached text file, the short-term part of the indicator is already potentially viable on its own for trading either stock indices or currency pairs involving JPY.

Please note that the document is NOT intended for public distribution outside of this Forum. Constructive comments welcome.

PART1_ShortTerm_181110TM.jpg
AttachmentSize
System_testing_Indicator_Part1_181110TM.docx 16.36 KB
 
Rookie

T5, while I and others participate in other forums as a rule I don't but can't speak for others do not "Please note that the document is NOT intended for public distribution outside of this Forum." the said once it is posted it becomes public domain and searchable via Google and any other search engine.

T5, great effort on your testing and follow up postmortem. I use the Double Bands every day with an oscillator and your MACD version is similar. As you can graph the change in momentum very well but sitting there waiting for the signal can be a very tedious thing and we as humans hove other responsibilities consider adding a buy or sell signal upon the change. Also consider add a filter of maybe two or three candles to avoid false breakouts.

I use the free version of TVC so I have a very limited signal capability I also have an old flip phone so alerta must be sent to my PC and no alarm goes off... I have the alert set for when PA crosses the 2% signal line heading toward the mean. It works very well what doesn't is my lack of modern cell phone.

 
Ronconomics

thanks Tony. Trend quality is interesting . I spent a few moments wondering how I would define quality. I guess what we want is something tradeable.

A..My perfect trend in no order:

1 persists a fair while (something to do with efficiency of effort) and because the risk of loss is heightened at the end of trend.

2 Price bars would range (not price per se) within a fairly small channel (s protective stops didn't trigger prematurely (seemingly random spikes on nzd gbp jpy pairs have spoiled my day). Cycle amplitudes similarly if going for extended moves.

3 be able to spot early allowing entry with confidence . there seems to be some merit in targeting the second wave of s three wave move. that's entry after the first pullback for good probability of success and decent Risk Reward .

4 offer scaling in opportunities which might conflict with 2

5. midtrend consolidations should be short so time at risk is minimised before continuation or exit.

B. Overall there's a world of difference between pip moves (opportunity) and tradeability (how likely am I to harvest this). Range traders might set an efficiency measure of the % of each oscillation they actually capture.

C. anything that gets you sitting on your hands when your tools strategies styles and tendencies aren't suited is worth its weight on gold.

D News risk. A coin toss but the risk averse should avoid or mitigate by trading high time frames. Trading pairs which are less attractive on other criteria can be fine if you completely avoid being in pairs hit by news. "Hit" here means neither with trend or counter as just the injection of chaos can spoil steady progress
(assumed goal). Missed opportunity is not a problem of pair selection in my view. It's more of a broader optimisation aimed at consistent profits.

E Asset class choice. I suspect switching markets is problematic. Shares might trend daily more profitably than FX (less mean reversion) but there's more overnight and weird issues. Costs and spreads are important so it's harder to get the law of large numbers working for you.

I admit i don't know much so nothing here is based on authorative testing or experience. Just gut.

F

 
t5tonym

After completion of initial testing of Part1 = Short-Term component of the indicator as documented above, the initial testing of Part2 = Long-Term = Alignment component of the indicator is now also completed, see attached document. The next step will be to combine the two parts.

Constructive comments are welcome.

AttachmentSize
SystemTesting_IndicatorPart2_LongTerm_181111TM.docx 19.21 KB
 
Rookie

Ron, all good thoughts. I want to highlight the following.
"there seems to be some merit in targeting the second wave of s three wave move. "
"traders might set an efficiency measure of the % of each oscillation they actually capture."
"sitting on your hands"

 
t5tonym

Hi @Rookie, yes, sure you are correct. There really is no controlling what anyone does with anything. Many of us know that "copyright" is basically useless, so i don't even bother. However at least i encourage people on the Forum to keep our ideas primarily for sharing amongst ourselves ;-) Also, well highlighted points regarding Ronconomics' post. Thanks.

Hi @Ronconomics, whether you use rigorous testing or gut instinct, it really is very valuable to be thinking exactly as you are about what constitutes "a perfect trend" vs a very nasty beast that will whipsaw the hell out of everyone. In fact, just by thinking this way, it is possible to come up with some neat and creative ideas about innovative non-conventional indicators.

With regard to the specific issues you mention:

1. I completely agree, and it is what everyone would like, although predicting the end-of-the-trend is notoriously difficult. Sometimes looking at statistics of how long trends "usually" last can be useful.

2. Spikes vs trends. Prices that zip up & down always make problems. Think of doji bars vs trend bars, and then extend the thought about the duration of the bar :-)

3. Wave counts can sometimes be useful. Elliott is usually too difficult and subjective, but Al Brooks has written some good stuff about this in his books.

4. Scaling-in is actually part of a trading system rather than an indicator per se. As my objective here is to design build & test just a new type of indicator rather than a comprehensive trading system, therefore i'm not looking at scaling-in here.

5. Agreed. Mid-trend consolidations (vs. clear uninterrupted trends) are definitely part of what constitutes trend quality.

B. Obviously a "Perfect" indicator does not exist, but the better an indicator, the closer we should get to capturing as much as possible of what is there in the price action. Therefore minimizing indicator lag is always a big consideration for me. In fact this is exactly the reason why I am building this thing in 2 separate parts ... one with minimum lag and the other where lag shouldn't matter too much.

C. Yes, yes and yes. Absolutely. You have hit on one of the "big secrets" of trading with this. To me, the best indicator is one that says to me: "Look, Just STAY OUT for a While!!!" I completely disagree with those people who say that indicators should be as "accurate" as possible. Much better to design indicators to be as safe as possible. Why? Because as long as i am appropriately warned not to blow money on potentially bad trades, then I really don't care at all if i miss a few opportunities. There will always be more trading opportunities again later.

D. Partly agrees with C and partly a separate topic. Some people working on algos do include an automated "responding to the latest news" component to their input, but I definitely will not be doing that here.

E. Several comments on this:
- Any sort of "optimization chase" (including switching assets) is not necessarily useful.
- Although there are many commonalities, different assets really do have different characteristics.
- However, the previous line notwithstanding, a good trading system or indicator should be robust and this means preferably working at least marginally well on as many different assets as possible, even including the ones you do not necessarily intend to actually trade. For explanations of why, see Perry Kauffman, Thomas Stridsman or other good trading system designers.
- Mean Reversion (MR) -vs - Trending (or trend following, TF) is definitely a key consideration. However to anyone who says that one asset class tends to be mean-reverting and another tends to be trending in character, i say no. If they actually do careful research (rather than just repeating what other people have written), they will see that it is more a matter of all asset classes being both MR and TF, and the degree of MR vs TF varies very much over time. This is something worth looking at and is far more useful that broad generalizations about asset classes. In fact it can be used as the basis for a very nice indicator, as well as for techniques like Markov Chain analysis and probability of regime change.

- Costs & spreads. Yes absolutely. Nothing pisses me off like seeing my pip numbers are green but my profitability numbers are orange!!! All because of this. For some time I have been wanting to also build a "No, the Spread-is-Too-Wide-Now" indicator, but i need some help with Alveo/C# to do it.

Cheers, all the best, TonyM.

 
Ronconomics

Nice one Tony. Keep up the good work.