Time shift brainstorm

 

Hi everybody. I had an idea today and would like to get some feedback.

We all know there are lagging indicators like moving averages that give signals after the price has already started (and maybe finished) its move. And there are other indicators which provide instant data/signals but can often be influenced poorly by news events and inconsistent trader sentiment.

I've found myself trading successfully recently by comparing multiple time frames. I define a trend on the daily chart and make sure a relative trend is in place on the H4 chart. Then, based on the same indicators on the hourly charts, I'll place trades with the stronger trends when budding counter-trends appear to fail. I've come to dislike the 15m charts (and smaller) for any practical use because I trade gbpjpy regularly and there's too much noise. They make me too anxious. It's just too goddamn... bouncy.

This has led me to a sustainable ratio of winning to losing trades.

I was considering the notion of lagging and direct indicators when I stumbled upon an idea. The data used to generate proper signals with lagging indicators has nothing to do with the accuracy of the indicator. It's simply using old data.

In my experience, it appears that most market-makers will bleed every penny out of the poor traders who are trying to turn the market with their hopes, dreams and immature trading strategies.

Again, most of my trades are placed because of discrepancies between the daily, 4-hour and the 1 hour charts. I place my trades on the Open of 1 hour bars and only like holding them for, at most, two or three hours. I am usually out with my profit for the day in between 5 and 30 minutes.

I'm going to refer to important bars as the "hot" bars. A "hot" bar is an hourly bar which is falling back in line with the greater, consistent trends on the 4-hour and the daily charts. Hot bars will be forming candlestick patterns which show the price being actively influenced by either a popular period moving average or a previously established support/resistance line.

With this in mind, there often seems to be a window of about 8-10 minutes before the "hot" hourly bar closes when an existing trend is extinguishing the last efforts of the less powerful parties trying to turn the markets.

Now, I have always considered lagging indicators as fairly weak for giving good entry signals in most cases. But that doesn't mean their system, the math behind them, is by any means inaccurate. It simply means that the speed at which they process data is not reliable enough to justify accumulating risk by entering the market.

Most traders wait for confirmation. The only problem with waiting for confirmation is the fact that you have to wait for it. When the market wants to move, it will move right out of the gate.

So today I set up periodconverter.mq4 to display 50m charts in an attempt to give an initialsignal 10 minutes before the "hot" hourly bar closes. This will allow the standard hourly candle to act as confirmation and also allow immediate entry and optimal positioning (provided everything else I've talked about is in place). I actually wanted to use 52 or 53 minutes, but it apparently is not possible to do this with period converter.

But I ran into a problem. The problem with using 50m candles is that they cycle. Let me explain. Here is the list of opening times for the 50m candles in succession:

00:00

00:50

01:40

02:30

03:20

04:10

You can see that even though the markets are being tracked in 50m increments, the purpose of anticipating the next hourly bar within 10 minutes is not maintained for very long. The idea was to generate a signal around the 51st minute of each hour.

So here is my dilemma. I have come to the conclusion that I ultimately need to completely shift the data being used to plot the candles. I need to be able to use hourly data which begins and ends on the 51st minute (or 52nd or 53rd, hopefully) of the hour instead of the 1st minute used on standard hourly candles (00:00, 01:00, etc.).

This will allow any indicator to provide an initial signal on the advanced chart and the confirmation on the Open of the new, standard hourly bar. This is very important because, in addition to providing confirmation, it will let me enter the market on a populartime frame to take advantage of stronger momentum and a smaller chance of drawdown.

So I don't know if it's possible to do something like this by modifying periodconverter.mq4 in some way. I don't know if it's possible at all. I just need to be able to specify which minute inside of a standard hour should be used as the first minute.

Again, I just had this idea today and wanted to get it down on paper. If anyone cares to help develop this or has any input at all, I'd be very appreciative. I am able to code a little in MT4 but am not familiar with the time functions.

Thanks,

R

Files:
gj.gif  19 kb
 

You can't do this in the way you want...

Basically hourly time begins and ends on the hour. In order to do what you want, you would need to have the 'custom candle' indicator set to 60 and put it onto a M1 chart and then shifted either back 7 bars or forward 53 bars (looking at the current code, I think you will probably need to shift it forward rather than back as the start bar is 'Bars -1' which normally means the very first bar in time on the left of the chart.)

To the best of my knowledge, this mod has not been made. However, you should look at that indicator first as the basis for your search.

I have attached it here for you so you don't need to search for it.

BTW, your post was rather long winded for a simple request...

Files:
 

The only way you have is to wait to 9 minutes before candles closes. You will have a pretty good idea about coming bar. With exception of news and big impact events.

Any other way just will create distorted data. If you want 50 minutes candles got it, that's fine, but don't mix 50 minutes with thinking as hours. It does not have any sense.

Same rule is for any time frame.

 

Time shift

Hi Lim, Linuxser.

Thanks for the replies.

Lim, I'm happy it made sense. I did not write it as a simple request.

I've been using a version of customcandle.mq4 which has a shift variable. I'll attach it. What I had really wanted to know is if periodconverter could be amended to do roughly the same thing. I'd rather use periodconverter because the OHLC data from the custom candles can't be used directly. You can't (or I can't) apply any indicators to that OHLC data instead of the standard OHLC plotted on the 60m charts. Periodconverter actually generates a new .hst file for the custom timeframe and... I believe that's what needs to be done here... a separate hst file where the raw data is shifted.

I'll start working on it.

Thanks again for the quick responses, guys.

R

Files:
Reason: