Hey everyone. I’ve got a few questions I’m hoping someone can help me out with. I wrote a simple ea that I ran on a 20pip range bar chart that looks for a change in bar direction and then a follow up bar of the same color. If the follow up bar is the same color then I count it as a win if its not I count it as a loss. My guess was that it would come out to be around 50/50 over many thousands of bars. I was thinking if it is a 50/50 chance then a martingale system of doubling the lot size after a loser and resetting it to start after a win would have a good chance of not going bust. It would essentially be betting on a coin toss.
My question is, if this is really 50/50 wouldn’t the chances of getting 7 losers in a row simply be (0.5)^7?
I was surprised that when I ran the program on 3 years of bars it came out with 14 consecutive losses but it counted 8050 wins and 8414 losers which would seem to be close enough to 50/50 to be able to count.
What flaw am I making in my thinking? Or is it that I’m doing something wrong in my code counting everything?I’ve attached the ea in case anyone wanted to take a look.
If you were to trade in the direction of the longer term trend (i.e., the master trend) you would surely increase your chances of success?
According to a video I watched by Joseph Nemeth (available on youtube), he defines the ‘master trend’ as the outcome of the previous day. Example, yesterday on the daily chart, NZDUSD finished down therefore today you would only be looking to sell NZDUSD.
You would also have had a lot of success buying USDJPY for the last 6 days!
Darklighter, I’d like to help and I appreciate that you have the ability and interest to write code to help you look into your ideas. I may need a clearer picture on what you’re trying to do. If I understand, you are looking into sequential bars and if one bar is up, what the probability might be for the next bar to be up. Something like that.
First, I have done a lot of work on daily breakout strategies and invested considerable effort in trying to find some predictive correlation between one day and the next. Based on a lot of suggestions from my threads, I have tried to find that elusive qualifier that would tell us to take the breakout only in a predetermined direction. I must say I have not found that predictor yet.
Regarding using yesterday’s activity to predict today’s: While it is true that you will see strings of days in the same direction, i.e., usd/jpy may have closed up several days in a row, the longer term stats tell a different story. Going back to 1996, we have just over 5,000 days of data. How many days closed higher than the open? Answer: 2,687. When yesterday’s close ended higher than yesterday’s open, how many times did today’s close also end higher than today’s open? Answer: 1,347. How many days closed lower than the open? Answer: 2,502. When yesterday’s close ended lower than yesterday’s open, how many times did today’s close also end lower than today’s open? Answer: 1,318. Unless I am missing something, that’s pretty much down the middle and non-predictive.
Now, you mentioned range bars and that may be a different story. I have paid for Renko information and indi’s from a guy named Jeff Glenellis. Not offering a commercial here, just saying I have bought the material and haven’t had time to get around to digesting it yet. One thing he did discuss in a webinar was the probability of one bar being following by a bar of the same color. I believe he was using 10 pip Renkos
and came up with this information on his favorite three pairs:
He observed about 9 color (direction) changes within about 45 bars. His conclusion was that color changed about 20% of the time, which would mean, conversely, that color followed color about 80% of the time.
For gbp/jpy, he noted that a bar of one color was followed by a bar of that same color about 70% of the time.
For gbp/usd, he offered the same percentage.
For gbp/chf, he suggested the color following color approached 80%.
I sense that there is a pony in here somewhere and I hope to have more time to pursue it soon. I will watch your thread and see if you continue to look into this. Perhaps something I have offered here will be helpful. Best wishes for your trading!
I did the math on it, and the chances of getting 14 wrong in a row is 1:16,600. Your program took 16,400 trades, so this is completely within reason to expect that many consecutive losses given your win/loss of 50/50 and give you took 16,000 trades.
To make martingale work you need a method with a fairly high win rate, that would keep your consecutive losses statistically very small, never more than 4-5. Then you can start with a risk of .25% or so and make sure you never end up blowing up your account.
Thanks for the replies! I’m going to keep looking into range bars and renko to see if I can find some correlation between the previous bar and the current one. I might revisit daily candlesticks as well. If I find anything I’ll post it. I’ve fixed the free RenkoLiveCharts_v3.2 ea to work with current metatrader builds but I’m not sure if I can post it since I am not the author of the original code. I can post how to fix it though.
@krugman: Could you tell me how you got the 1:16,600 number?
Sure, I took (1/2)^14 * 100 to get the % chance of that occurring. Then I took 100 divided by that number to get the number of times it would take to get those results. In this case 1 in 16,666.
Paragraph 4 of your post above is an EXCELLENT elaboration on the point I was trying to make and it is consistent with the statement made by Joseph Nemeth which is that if (example) USDCHF closed up today then there is a 75% chance usdchf will also close up on Monday. Therefore, if you were day trading USDCHF on Monday you would only look to go long in your trades.
I have also manually back tested a renko trend following strategy and in theory they work great however price does not stop as soon as it has built a new block. If price surges up or down then it will print a lot of bars at once.
There may well be an equal number of up and down days in history but consider this, price would never trend if there weren’t a string of up days or down days. Therefore what Jeff and Joseph both state does seem to have some truth in it.
[QUOTE=“Tyrone Archer;618284”]I like the sound of this but don’t know nothing about Renko. If anyone could enlighten me further it would be much appreciated.[/QUOTE]
Found this on google. Does a much better job explaining it than I can. They are very interesting charts nonetheless and according to MoneyNVRSleeps only around 10% of forex traders actually use them xD. I haven’t been able to get a good version to work on my mt4 unfortunately but I have had a growing interest in them lately thanks to money and several vids I have seen on YouTube lol.
As long as you use 15pip box size or more and avoid major news releases I think an EA could trade them pretty well. As useless23 says 50 pip box sizes would work very well. I’ve run an EA live on 20 pip bricks for a week with no problems. All my trades were executed properly but there weren’t any extreme moves. I still haven’t come up with a strategy I liked yet. The biggest problem I’ve had with them is that the strategy tester results are useless because of the way the bricks are drawn so testing ideas is a bit more difficult. I’m going to be trying out a few ideas this week.
Legond, I’ve been using this to make the charts. Renko Charts - MQL4 Code Base
I just changed 2 lines to make it work live with current metatrader builds. I don’t remember which exact lines but I’ll attach what I’m using.
another problem with renko is the problem of a stop loss. If you were trading a 50 pip renko brick, price could in theory retrace by 99 points and then go back in your favour without printing a brick in the opposite direction (price would have to retrace by 100 pips to print an opposing brick). One would have to use a large stop loss, alternatively have an ‘always in the market’ approach.