Daily Fibonacci Signals

Post Reply
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Daily Fibonacci Signals

Post by snailbeard »

xfactornos » Fri Jun 12, 2015 12:01 pm wrote:There is no such thing as a final version :lol: Good job at keeping at it! Most people are lazy or run out of patience and give up. :good:
And just to confirm this, lets have a look at this GBPUSD buy entry at 21:45 on 6th May 2015:

Code: Select all

13	2015.05.06 21:45	buy	5	0.34	1.52568	0.00000	0.00000	0.00	10541.40
14	2015.05.06 21:45	modify	5	0.34	1.52568	1.52090	1.53046	0.00	10541.40
15	2015.05.07 09:51	s/l	5	0.34	1.52090	1.52090	1.53046	-109.19	10432.21
[/size]

If you were trading manually the first thing to put you off would be the time: 21:45 which is outside the prime trading hours for GBPUSD. A corollary to this is the falling ATR and volume. So can I use ATR and volume instead of a fixed time because sometimes big moves occur outside the peak trading times.

The following chart shows weakening interest by both price movement and volume:
gbpusd-m15-rising-price-falling-volume-2145-06May2015.png
There is no difficulty adding this as a filter:
The first stage is reduce the ATR and Volume behaviour into a collection of predicates which produce boolean values:

Code: Select all

21:30 GBPUSD: M1 SDIT:   
 bVolM15Bk1RiseFlag: 0 bVolM15Bk1FallFlag: 1
 bVolM15AboveVmaFlag: 0 bVolM15BelowVmaFlag: 1
 bVolM15Bk10FallingFlag: 1
 bM15Atr14LtAtr100: 1 bAtr14M15Bk10Falling: 1
[/size]

we can then simply use Boolean algebra to define rules which result in true or false:

Code: Select all

21:30 GBPUSD: M1 SDIT:  bM15AtrVolVmaFallingFlag: 1
[/size]

So our new rule is: don't trade if bM15AtrVolVmaFallingFlag is true

21:30 GBPUSD: : Caution: bD0BarRangeOnH1Sma60: 1
21:30 GBPUSD: M1 SDIT: Warning: bH1ProbableReverse1
21:30 GBPUSD: : Drop: buy/sell: bM15AtrVolVmaFallingFlag
21:30 GBPUSD: M1 SDIT: Lost interest.

So far so good, except simple rules tend to kill off some good trades as well. It will therefore probably be necessary to qualify this rule with other rules...
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

unexpected twist

Post by snailbeard »

After several years of trying to produce an adaptive EA, I have ended up with two quite different approaches. This one based on a shorter term trend which I have been able to 'curve fit' to GBPUSD, but doesn't work well with weak trends like EURUSD. However, it should work well for anything that goes into a strong trend. GBPUSD had weak periods and strong periods and was able turn off trading for months at a time until a strong trend was detected. Careful analysis of ATR on several time frames enables the EA to detect the weakening of trends, thereby eliminating most end of swing entries:
gbpusd-12months-Np17-Dd3-run2015-06-11.png
However, despite the original intention of finding regular entries with the help of Fibonacci levels, the result is clusters of entries during stronger trends resulting in more profit but fewer trades. This EA might work better on other assets which have well defined stronger trends. It is not suitable for use on a basket of erratic currencies.

Now we come to the twist...
The long term (stock & index) trading method (with stacking) now works better on currencies than the 'daily fib' method, but the unexpected bonus is that the results for a basket of currencies are quite similar. There is no pair by pair adjustments.

In the following charts over the same 12month period, the results are quite similar. One pair that didn't do well was GBPJPY and this is because it is more erratic than the other pairs tested.

GBPUSD:
GP-GU-LTSk_NP2247_DD5_run2015-06-26.png
EURUSD:
gp-eurusd-LTSk-NP1400-DD4-2015-06-27.png
USDJPY:
GP-USDJPY-LTSk-NP2300-2015-06-26.png
Although the draw-down is a bit on the high side (4 to 5%) it is not ridiculously high.
I would be interested to know if there is a correlation in the draw-down, which is often the case when trading a basket of currencies. So the worst case scenario would be trading say 10 pairs with a correlated draw-down of 10 x 5%. If one can trade uncorrelated assets then the number of simultaneous trades could be doubled.

The conclusion is that the long term trading method is more generic and usable across a wider range of assets and that this is where I need to focus my attention... The same method might also work on shorter time frames but I would have to re-implement it in a more generic way.

Due to various commitments I might not be able post for a month or two.
You do not have the required permissions to view the files attached to this post.
nonlinear
Trader
Posts: 293
Joined: Fri Jun 01, 2012 2:56 pm
Location: Washington DC

Daily Fibonacci Signals

Post by nonlinear »

Still following this, SB. I am now of that view that any EA must adapt to changing market conditions based on recent price action and statistics. Markets change, so must EAs.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

USDJPY - unexpected sell

Post by snailbeard »

After a long break I am enjoying the current roller coaster ride. According to the first two weeks of the NAS100 chart in August all indications were lower lows and lower highs. Also the maximum volume of each week was higher than the longer term average and higher than previous week. The third week had another lower low combined with an accelerating ATR (up) and accelerating OBV (down). That was the confirmation of a trade-able swing. However, since we are mainly currency traders: lets take a look at USDJPY. Clearly only a brave person would short USDJPY. There has been a steady trend upwards for 12 months at least. So why did my EA short USDJPY on 25th August? Did it take a look at China and the NAS100 and panic?

Is it a bug, an anomaly or a algorithmic compromise?
usdjpy-roller-coaster-sell-25Aug2015.png
According to the MA240 we have a long term up-trend, however the MA120 is ambivalent and MA60 is down. On a faster time-frame we could see acceleration and increasing volume, ATR, and OBV accelerating down. In retrospect we can see that when price passed the previous weeks lowest price there was increasing action and it would have been an ideal short term sell entry. However, this version of the EA ignores short term signals but also ignores MA240 even though it is probably right, waiting for MA240 to catch up with the market is also a problem.

The decision to enter a sell trade has ignored the long tail of the previous bar indicating strong support near the long term MA. It was not an ideal entry, although we cannot rule out a longer term pull-back, at the moment the price appears to be ranging between two longer term MAs so next few weeks will be interesting when I find out if this turns into a longer pull back or a short term adjustment...
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Bugs Bugs Bugs

Post by snailbeard »

I am still running this EA in demo mode to see what bugs are going to crawl out of the woodwork.

Today there was an unexpected sell entry for EURJPY which occurred shortly after server midnight.
The following chart shows price ranging and there is a D1 lower low but not a longer term lower low.
eurjpy-ltsk-unexpected-midnight-sell-15Sep2015.png
Looking in the log file:

Code: Select all

iW2Direction: -1, iW1Direction: 1, iD1Ma10Direction: 1, bDailyDontBuy: 0, bDailyDontSell: 1
[/size]

Shows an explicit 'don't sell today' flag which should not be ignored.

The timing is exactly at midnight which is always suspicious since a lot of cached values have to be recalculated. The log file confirms which method made the order but nothing more:

00:00 EURJPY: LTStkM: Setup VPO by JL Stock method Dir: -1 At: 136.06600
Hopefully I will get some time to investigate this witching-hour glitch...
You do not have the required permissions to view the files attached to this post.
User avatar
Jonathan2FI
Trader
Posts: 119
Joined: Fri Jun 15, 2012 9:26 am
Location: Birmingham, Frankfurt, Brussels

Daily Fibonacci Signals

Post by Jonathan2FI »

Very interesting - I have been trading Daily fibs and Price Action PA and see correlation with your approach and where I am going with trying to code into an EA.
The basics from my side (all on the daily) are find the dominant trend, wait for strong PA e.g. a large candle, Engulfing with little or no wick on the top if long or or no wick on bottom if short - then place 2 trades one at market open and the other at 61.8 retracement with SL beyond 38.2 for the retracement and 50 for the market order with both TPs at 161.8 extensions.
I have been coding an EA based on above and looking at how to avoid the flat periods. I won't go into all the areas I looked at needless to say I have not found the ultimate. Although I take your point about moving in full circle as I recently tried a promising indicator Ichimoku and Bolli's that I have previously spend many months on 3 years ago. On wards and upwards
Jonathan
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Guerrilla warfare (preparation)

Post by snailbeard »

Those of you who enjoy? my posts might be wondering why I have become so quiet. Partly it is time, but mainly it is doubts about my approach to the game. All the long hours of analysis, coding, testing and pain should have paid off by now unless there is something wrong with my thinking.

There have been positive discoveries like incremental (stacked) trades over a slow time frame can be very effective sometimes and this is something to be improved, also short term trading can only be successful if we become a successful soldier in want is effectively guerilla warfare between a number of big players.

I browsed through pages and pages of Zulu traders and only found a couple of steady and long-term successful traders. It seems that 99% of these short term winners will go down the pan.

I looked at lots of 'successful' myfx traders only to see 'this page has been deleted by the owner' over and over again.

So for me that is empirical evidence that more than 90% traders lose their deposit and perhaps 99% of automated traders.

Trying to code in MQL has produced a monstrous amount of unmaintainable code and being tied to MetaCrap is also too constraining, but the alternatives are not mature. So I spent sometime looking at other programming languages like Haskell and Scala, while these are really good for capturing ideas with less coding but less suitable where performance and integration are required.
So the drawbacks are
a) cannot compile to a Win32 DLL
b) 100 to 500 times slower than C and C++

Performance is not an issue under all circumstances, but I already have a handful of algorithms which make money when used in the right way. What I need to do now is manage those algorithms. So how do we discover which of a basket assets is to be traded and which is to be ignored? Which time frame is appropriate and which isn't?

To answer these kind of questions requires multi-asset analysis, but I might not need to do these over and over again for the same assets and period if I can capture results in say a database. Wouldn't be great if I could display complex charts and do statistical analysis?

Being able to do all these things requires a framework which I have been inching towards and it all hinges on C++. Not the friendliest or forgiving programming language but used by physicists and scientists to crunch billions of numbers. Now it has acquired some of the features found in Haskell and other higher level languages. Easy to produce 32bit DLLs and use other DLLs for talking to databases and plotting graphs.
I have just added g2log which is a high performance logging utility. So now there is no excuse for not doing proper analysis.

I have also been playing with some code to read the history files from Zorro. There are some oddities with the date field which has to be 64bits long and Zorro reads this as a double to get the 64bits, but g2log has some tricks for working with time and it worked fine compiled on Linux 64bits, but wouldn't initially compile for Win32 because the compiler does not yet fully support 64bit time on 32bit Windows

Now that's enough boring technical stuff what about the guerilla warfare - it looks like that will have to wait for the next post...
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

guerilla warfare (pre action)

Post by snailbeard »

Looking at EurJpy recently and noticing a guerilla strike on the 3rd of December piqued my interested on how to join the melee without being stopped out.

Starting with the long range history going back to March 2015 we can see that Fibonacci super support and resistance persist into the present:
eurjpy-weekly-fibonacci-support-Nov2015.png
The trend for October and November is clearly a down but with falling momentum. Interesting things happen at Fib38 and Fib23. So what is behind the strong reversal near 23.6? Is it to do with the Yen or the Euro?

We can learn something useful by looking at EURGBP for November/December:
eurgbp-H1-2days-drifting-up-then-erruption-3Dec2015.png
From this we can conclude that the price change is less to do with the Yen and GBP and more to do with a pull to accumulate Euros. If we analyse several EUR pairs we can avoid trading the same swing and risk on several EURO pairs and instead concentrate our troop movements on one pair with the best potential.
What does that mean and what has to be calculated?
The obvious ones first: spread and swap
then there is price swing potential (how far can the price move for each asset)
and there is chaotic stop-out risk (whipsaw)
and finally there are the smaller reversals in each time frame (we want stops to be as close as possible to entries but not so close that there are too many stop-outs - one of the hardest compromises to optimise)
So what has been described here is completely separate from trade entry timing and trade management.
These are measurements which can be made and stored in a look-up table.

We could look at 10 Euro pairs but in the next post lets just look at EurJpy and EurUsa on H1:
You do not have the required permissions to view the files attached to this post.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

guerilla warfare (watch your back)

Post by snailbeard »

Looking at H1 for EurJpy and EurUsa reveals some interesting inconsistencies between various pairs.

EurGbp looks similar to EurJpy and here is EurJpy for H1:
eurjpy-h1-rising-prices-2Dec2015.png
I have highlighted significant support and resistance at some of the Fibonacci levels. These higher-highs and higher-lows are similar to EurGbp, but towards the end of the chart we appear to have growing downward momentum. Some bears are already piling in. Since the weekly trend is/was down this is quite tempting but it might be safer to wait until price reaches a lower low - lower than it was last week ago if we are thinking about the long term. If we think bulls are gaining strength we might want to wait for a higher-high.

What do we understand from the EurUsd chart:
eurusd-H1-misleading-bear-trend-3Dec2015.png
So according to the USD there is no hint of price drifting upwards, everything is down and we even have a new lower low. If we are a single asset trader then we should definitely trade the lower-low breakout.

Now something we couldn't possibly know is that there is secret super support lurking not far from this lower-low.
I found it retrospectively in the historical W1 chart. Not only that, but you might be surprised at how well the the long term price swings adhere to Fibonacci levels. So perhaps the Quants play the long game and a particular price fires their buy and buy as much as you can signal?
So here is the weekly chart going back to April 2015:
EurUsd-W1-9-month-cycle-Nov2015.png
We need to digest this before we go any further...
You do not have the required permissions to view the files attached to this post.
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

Daily Fibonacci Signals

Post by thomasmore »

very interesting approach, I'll keep reading this with great interest. Great job!
Ludo
Post Reply

Return to “Automated trading systems”