
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi people,
After two months or so in MQL5, what I meant back then was something like the following. And sorry about posting whole code, it's better for search engines. :)
Hi people,
After two months or so in MQL5, what I meant back then was something like the following. And sorry about posting whole code, it's better for search engines. :)
Hi Arthur
Hi Arthur
Hi Arthur
I worked for a decade measuring industrial process output through signal processing. Then I switched jobs and a new colleague, who is a daytrader, said I could use my knowledge and experience assembling an EA for the Brazilian derivative market (USDBRL).
So, out of nowhere, I downloaded MT5 and opened a demo account. Before even knowing about any indicators, I tried to use my knowledge to predict direction. The first thing I did was to download stocks data and do quantile regression, which proved to predict values better than averages and linear regression.
Why? Because quantiles swipe out all the noise. Is far more robust than moving averages. I used quantile regression at industrial signal processing. I had chills in my spine when I found the definition of "median price". Although I use HLC as candle price while testing strategies, I know it is not representative to the candle.
In signal processing we have time, not bars. A millions of signals processed per second. And that means physics time. When market is flat, using time instead of bars can give higher predictability for a fact.
So, one can calculate speed, acceleration by filtering noise. But it has to be done using time. And then comes SymbolInfoTick(_Symbol,_MqlTick) in hand. _MqlTick.time_msc gives time in milliseconds (ms). So multiplying it by 1000 gives seconds and by 60 gives us minutes. So, if I calculate speed, the number gives me a very straightforward answer: it is going up or down x monetary units per minute. So I can easily expect the price in one minute time just adding it to last (when available) or bid/ask. Just place (Bid+_MDSlope[0]) and check the results 1 minute later.
At signalprocessing, there is no such a thing as timeframe. Basic time unit is 1 second. And there is no other time unit.
And yes! The code is dirty! :D I only did care about some statics. :) I am not a programmer myself.
If I remember Fourier well, I would say 50% of all indicators are, inf fact, a polynomial equations trying to be converted into a sinusoid. :P For instance, rewritting iAO and optimizing both fast and slow periods gives better results than 5 and 34. If it used the median of 3 would make more sense for smoothing. You can include in it MACD and Alligator.
So, rewritting speed, acceleration using quantiles for smoothing always produces better results in signal processing. I still didn't test comparison for prediction. I lack the skill to do so, or even write an article.
Hi Arthur
Thanks for warning about the typo!
I will add a price mode later to it, so one can choose ask, last or bid. Currently uses only last prices, so it won't run on forex.
I worked for a decade measuring industrial process output through signal processing. Then I switched jobs and a new colleague, who is a daytrader, said I could use my knowledge and experience assembling an EA for the Brazilian derivative market (USDBRL).
So, out of nowhere, I downloaded MT5 and opened a demo account. Before even knowing about any indicators, I tried to use my knowledge to predict direction. The first thing I did was to download stocks data and do quantile regression, which proved to predict values better than averages and linear regression.
Why? Because quantiles swipe out all the noise. Is far more robust than moving averages. I used quantile regression at industrial signal processing. I had chills in my spine when I found the definition of "median price". Although I use HLC as candle price while testing strategies, I know it is not representative to the candle.
In signal processing we have time, not bars. A millions of signals processed per second. And that means physics time. When market is flat, using time instead of bars can give higher predictability for a fact.
So, one can calculate speed, acceleration by filtering noise. But it has to be done using time. And then comes SymbolInfoTick(_Symbol,_MqlTick) in hand. _MqlTick.time_msc gives time in milliseconds (ms). So multiplying it by 1000 gives seconds and by 60 gives us minutes. So, if I calculate speed, the number gives me a very straightforward answer: it is going up or down x monetary units per minute. So I can easily expect the price in one minute time just adding it to last (when available) or bid/ask. Just place (Bid+_MDSlope[0]) and check the results 1 minute later.
At signalprocessing, there is no such a thing as timeframe. Basic time unit is 1 second. And there is no other time unit.
And yes! The code is dirty! :D I only did care about some statics. :) I am not a programmer myself.
If I remember Fourier well, I would say 50% of all indicators are, inf fact, a polynomial equations trying to be converted into a sinusoid. :P For instance, rewritting iAO and optimizing both fast and slow periods gives better results than 5 and 34. If it used the median of 3 would make more sense for smoothing. You can include in it MACD and Alligator.
So, rewritting speed, acceleration using quantiles for smoothing always produces better results in signal processing. I still didn't test comparison for prediction. I lack the skill to do so, or even write an article.
Hi Arthur,
thank you for your story. I would like to split this into two parts.
The first part is using quantile regression in your calculation instead of linear regression or averages. I have no problem with that and it seems to me that quantile regression could be a better choice for the prediction.
The second part is the prediction. What do you want to predict? Do you really believe that you can predict where the price will be in one minute from a ms frame? Each tick changes your median slope dramatically. As I said in my previous post I can imagine using this kind of prediction in high frequency trading but I can't see any possibilities in trading by Metatrader. There is too much noise in lower timeframes like M1 (random walk) and you want to use a ms frame.
I appreciate your approach (something else than MA crosses) although I don't believe in practical use (at least not in this form). I'll try to watch your progress.
Good luck.
Hi Arthur,
thank you for your story. I would like to split this into two parts.
The first part is using quantile regression in your calculation instead of linear regression or averages. I have no problem with that and it seems to me that quantile regression could be a better choice for the prediction.
The second part is the prediction. What do you want to predict? Do you really believe that you can predict where the price will be in one minute from a ms frame? Each tick changes your median slope dramatically. As I said in my previous post I can imagine using this kind of prediction in high frequency trading but I can't see any possibilities in trading by Metatrader. There is too much noise in lower timeframes like M1 (random walk) and you want to use a ms frame.
I appreciate your approach (something else than MA crosses) although I don't believe in practical use (at least not in this form). I'll try to watch your progress.
Good luck.