The Most Profitable Trading Pattern You Will Ever Encounter

Philip,

Still working on this, no easy solution. Good news is that Jalepofan gave me 4-hour, 5 year data for GPBUSD and USDJPY. Just doing a quick test, using RSI(14) Daily (I know, not what we want as a filter), both GPBUSD and USDJPY fared better than EURUSD.

Now, I’m thinking of one way to skin this cat, is to actually programatically calculate RSI(14) Weekly or RSI(14) Monthly from the 4 hour data directly:

  1. For RSI Weekly Filter, I would need to calculate backwards 6 bars per day x 7 days in a week x 14 periods = 588 4-hour bars

  2. For RSI Monthly Filter, I would need to calculate backwards 6 bars per day x 30 days in a week x 14 periods = 2,520 4-hour bars

Since I have this data I could gather this data and apply it to the RSI formula: 100 - (100 / (1 + RS)),
where RS = (avg of N-bar up closes) / (avg of N bar down closes)

I may not calculate RSI values precisely on the Week or Monthly boundaries, but it would be close enough.

QUESTIONS:

  1. Does the above suggestion make sense to you? Do you think it would yield a satisfactory RSI filter value?

  2. Not being an expert on RSI at all, with 4-hour bars, would it make any sense at all to just calculate RSI on the 4-hour bars, with some longer period like RSI (588) for weekly or RSI (2520) for monthly? This of course would be super easy to implement, but do you think it would provide anywhere close to accurate RSI(14) Weekly or RSI(14) Monthly filter values, or would it be totally distorted?

Again, we need to do something so that we can accurately model an RSI filter. If we can do this, then we can run simulations, and play with values to see the pitfalls of the model. Once it is solidified and we have necessary RSI filter value, we can add the requisite RSI filter graph/value to the Dashboard that one of the other posters has already built, or I can build a separately generated Dashboard that I mentioned earlier, that uses the simulation code in real-time for all CCY pairs that we want to potentially trade.

Let me know if the above makes sense. Gotta retire for the evening and watch some mindless TV.

Thank you Philip, really nice system. simple and easy to follow.
I had been reading this thread from post 1 until now only at post 400.
Finally decided to give it a trial on my demo account.
Real account lose a lot of money before read this thread.
Hope this method will helps to regain my capital.
keep on it!

I understand what you are saying but I don’t think it will work. It will just yield a flat line on the RSI.
I think what needs to be done is to create a multi-time frame RSI first and apply it to your algo. It has been done. Such as here for example. I know the code is different but may be this code will give you inspiration to how to solve the problem.

Doesn’t my 1ST option above, where I’m basically calculating RSI manually do the trick? The only issue I see is that I may have trouble finding exact RSI Weekly and RSI Monthly on weekly and monthly boundaries due to calendars, holidays, etc (I might be off a day or so here and there unless I incorporate date/holiday math into the algo). Won’t this be real close to actual higher-frame RSI’s?

No it wont, it will just yield a flat line near the 50 level.
The thing is when you calculate the avg gain over the last 14 months. You see how many monthly bars (open and close) were gainers and how many were losers. Your method would never know where that open and close were.

That is why I shared a code for multi-time frame RSI so you can see how he dealt with that problem.

Hey Guys and Gals,
Is the attached chart in accordance with phil’s fib trail? Trail stop marked by yellow line.


Thanks

I may not be explaining myself well - hard on forums sometimes. What I’m saying with my 1st (not 2nd) method described in Post # 621, is that I would actually go back in time programatically, and calculate the monthly bars to determine the # gainers and # losers; I would manually calculate the O,H,L,C for each month. My only issue is that if I calculate back 30 days (for 14 periods), I may not be exactly on the Month boundary for each of these 14 periods when I calculate these O,H,L,C values - I may be off a day here or there. But the thought is that it would be real close. To have to include the date math in this would be too hard I think.

I understand why my 2nd suggestion wouldn’t be right; thanks for pointing that out.

Wealthlab provides a very robust mechanism for calculating Weekly and Monthly Roll-ups. The problem is that it only supports this function for Daily data. For intraday (for example, 4-hour bars), it ONLY supports roll-ups to Daily, and does not support Weekly and Monthly roll-ups. Hence, the problem.

I am suggesting that I can circumvent this, by manually calculating Monthly RSI(14). Lots of computing power required to do it - that is, simulations will take a long while to run.

Does this now make sense, or am I being dense and still missing something?

Thanks.

I don’t think you can do it relying on 4HR bars. There is no way you can compress the RSI data to a higher time frame. Because the calculations are very tough. You will have to go back 20 day (not 30) and see if the open was higher than the close of the 20 day period just to know if that month was a gainer or loser. Then do the same process for the previous 13 months before you can get the RSI data. Then you will divide the gainers by losers. Finally, you apply the RSI formula and compare it to the values we set.

To me it sounds much better to create a dashboard with the indicator. When the dashboard flashes use the indicator. But its up to you if you think its doable. I personally don’t think it will work.

However this guide argues it is doable, so read it and let me know.

You have to do it on monthly bars. That’s what I’m trying to say. I could be wrong though.

It is, but the trail stop should be under the 100 not above it.

Yes, we’re on the same page, and you’re right, it’s 20, not 30 days. I think it can be done, but will take work.

Yes, creating a Dashboard is pretty easy, I agree, but the whole premise of what I’m doing is to test to see if it’s viable to set up this threshold or not. If it is, then we can Dashboard away; if it’s not, we have to look at alternatives. By creating a Dashboard now, we’re just gonna be eye-balling data to see if we think it’s OK. I don’t advocate doing this, since this incurs potential account risk over the long-run.

Unfortunately, I have Wealth-Lab Version 3. They fixed this problem in the current WL edition (the link you posted), but I don’t have that version, and the programming language it uses is totally different from what WL 3 uses - in other words, I can’t port my existing code to it. More importantly, the language it uses is not in my arsenal. Finally, I would have to pay for it (around $700 US) or alternatively, I could get it for free, but I would have to create and fund a Fidelity account - Fidelity bought out this company a # of years ago. Too much change and disruption for me to do that. Unfortunately, I don’t have the time to do that.

Good discussion, let’s keep talking.

Well if you think its doable, I suggest trying it on EURUSD first. I did the manual back test with the monthly filter on that pair.
If the code will work, we should get similar trades. Then we can continue with other pairs. If not we’ll probably think of something else.

OK thanks so trail should be a close underneath 100,1.272…

OK, agreed. It’s gonna take me a couple of days to do this, so please excuse any absence of messages. BTW, the graphing features of my version of WL allow me to automatically, with a push of a button, switch from a 4-hour bar view to a monthly view, so I can graphically view the Monthly RSI on that chart. It’s the programmatic, simulated part that doesn’t support it. So, what I’m saying, is once I program this and obtain “calculated” Monthly RSI values, I can compare this to the Monthly graph, to make sure I’m doing it right. After that, we can compare EURUSD trades, as you suggest.

One other thing is that I need 14 months of data to occur before I get my 1st Monthly RSI value, so that basically eliminates the 1st 14 months of data from having simulated trades done on them…my data is from 2009-2015.

anyone else having issues with the chat room?

Hey Philip,

Before plunging into this implementation, I looked at the 2009-2015, 4-hour data that I have for 3 CCY pairs:

[B]EURUSD[/B]:

  • No monthly RSI(14) periods where we exceed 66.67
  • 3 monthly RSI(14) periods where we are less than 33.33 (12/2014 - 2/2015; 3/2015 is still incomplete)

This would result in [B]3 trades[/B] (2 for profit):

  1. Short on 1/12/2105 12:00 PM at 1.1813; Closed for profit on 2/5/2015 8:00 AM at 1.1347

  2. Short on 2/12/2015 12:00 PM at 1.1343; Closed for loss on 2/17/2015 8:00 AM at 1.1365

  3. Short on 2/26/2015 4:00 PM at 1.1258. As of the end of my data on 3/16, it was still open at significant profit

[B]GPBUSD[/B]:

  • No monthly RSI(14) periods where we exceed 66.67
  • No monthly RSI(14) periods where we are less than 33.33

This would result in [B]0 Trades[/B].

[B]USDJPY[/B]:

  • Lots of monthly RSI(14) periods where we exceed 66.67 (from 2/2013 - present, except 4/2014 - 6/2014)
  • Lots of monthly RSI(14) periods where we are less than 33.33 (from 3/2011 - 1/2012, except 4/2011)

This would result in [B]many Trades[/B] (too many to list here).

[B]QUESTIONS[/B]:

  1. Do you agree with these Monthly RSI Filter #'s (I want to compare the accuracy of my data with yours)?

  2. Also, based on this small sample set and your experience trading the system, will these Filter values provide enough
    opportunities for trade during those periods, or are we better off looking at the Weekly RSI(14)?

  3. Do the 3 EUR/USD trades above concur with you? The zero trades on GPB/USD?

So many points, I’ll number them just each idea is clear on its own.

  1. Its funny our RSI data should be different (not that its wrong, it can happen). GBPUSD never closed below an extreme.
  2. I expect that every month we are in an extreme area, we get one trade on the 4hr. One trade per month.
  3. No I prefer to use the monthly. You don’t understand what you have done for me; this system doesn’t work without the monthly filter. I didn’t know that because I happened to trade when the RSI was at a monthly extreme for many pairs. Its only when you tested the system outside of that area that I understood the importance of RSI.
  4. So I prefer trying the monthly filter first to confirm the relationship. If indeed we have a problem with the lack of trades, we can try linking the weekly on the 1 HR time frame. However I don’t think the lack of data will be an issue due to the plethora of forex pairs.

OK, great. I made 2 small changes on my post above (#635) - EURUSD had 3 months (not 2) where it was below 33.33, and you are right, GBP never closed beyond an extreme (my mistake). Glad this has been beneficial for you…it’s also been beneficial for me, as I’ve dusted off Wealth-lab, and has given me purpose in my pursuit of a more relaxed way of trading that is algorithmic. I’ve been trading short-term price action only last couple of years, and it’s too mentally fatiguing for me. So, hopefully, we’ve helped each other, and will continue to refine this, and ultimately build a fully automated Dashboard. And yes, you’re right; there is a plethora of CCY pairs out there; I’m sure a Monthly RSI implementation can probably still squeeze out a trade per week (or more).

Oh yeah, and one last thing…I may not have the latest and greatest version of WealthLab…my version 3 was released back in 2006, but I cannot overemphasize how much cash this software, along with some sweat equity, has saved me over the years. I know countless people that have busted their accounts over the years, but I’ve never come close to doing that. Back-testing is invaluable and I cannot overemphasize this to anyone on this forum, regardless of how and what you trade.

My charts showing that US SPX 500 is entering a buy signal - stochastics have gone into oversold - first one after the 20 ema crossed over the 50.


Check the chart above, I’m only new to using this system so could someone confirm I’m using it right? Thanks.

Also copper looking like it could enter oversold area soon.


[QUOTE=“pipalicous;691276”]My charts showing that US SPX 500 is entering a buy signal - stochastics have gone into oversold - first one after the 20 ema crossed over the 50. <img src=“301 Moved Permanently”/> Check the chart above, I’m only new to using this system so could someone confirm I’m using it right? Thanks.[/QUOTE]

Your analysis looks good to me. Let us know if you take a trade. I just opened a small long position on this one. My guess is that longs are more favorable than shorts when it comes to the stock indices, but I could be wrong.