![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
This "what's your annual target?" question drives me crazy ;-) I think it's completely pointless. We all want to make as much money as we can, obviously, and with minimum risk, but what's realistic is not our decision.
Maybe I have a good guess if it's gonna rain today and I can decide if I'll go outside and if I'll bring an umbrella and reduce the chance of getting wet, but I wont control the weather. Or at least I don't think the weather god will be impressed if my personal "target" is "plenty of sun today".
I can chose my trading environment, my position size, diversification and a well tested strategy. I can limit the risk and make sure that I have a historically positive expectancy and the result then just is what happens. Going by those rules, it's almost impossible to have negative years. But how positive? I don't think it makes any sense, to chose a "target" with something that cannot be controlled. Sometimes the trade just isn't there. I don't care. My only target is limited risk. Then I just take what the market has to offer.
Apart from that, for diversification it is important not to trade just one asset or currency pair and not just one system, so annual results also depend on the number of expert advisors that are running in parallel and on their online time / market exposure.
My personal red line for the drawdown of the entire account is 20%. Since 2007 I never reached this level, but I think it's important to define a limit. For an expert advisor to qualify for real trading I want to see at least 5 years of backtesting with a drawdown never beyond 15% (with round about 1% risk per trade; the actual formula is a little more complicated), at least 100 trades and a recovery factor >4. Needless to say that many expert advisors are dumped because they just don't qualify. No problem - on with another strategy. The profit factor is less important and depends on the number of trades during the backtest. A profit factor of something as low as 1.2 (after commissions and swap) can be totally okay if it was over say 2000 trades, while I would ignore such an outcome if it was over sasy just 150 trades. The EAs that reach profit factors in the ~2.0 area are usually the ones that trade only about once a week or less. Anything thats beyond 2.0 in my experience is only possible with serious overfitting (or high risk martingale or grid systems) and not realistic for real trading.
Other traders may have different limits. I think this is very personal. How risk adverse am I? What's the account size? Is it money that I need? Is it retirement money? Is it just "venture capital" that can be lost without any serious consequence...?
---
Sources for polynomial regression in the code base have just been quoted in a parallel thread. Working with the "trace line" on top of just standard polyn. regr. is my own idea (/at least haven't seen it elsewhere yet).
My computer (/Metatrader) is occupied with another backtest right now, so I'm sorry I can't create screenshots of what I mean at the moment.
@Chris70 : what do you think of ? :)
About "Siraj Raval"s youtube channel:
The youtube videos are for free, fun to watch and contain a much higher information density than most other machine learning videos on youtube.
I guess he's an intelligent guy, but I don't have the facts to comment on how he makes his money and related ethical issues or how many students he accepts for his courses or the footnotes of his terms&conditions.
About "Siraj Raval"s youtube channel:
The youtube videos are for free, fun to watch and contain a much higher information density than most other machine learning videos on youtube.
I guess he's an intelligent guy, but I don't have the facts to comment on how he makes his money and related ethical issues or how many students he accepts for his courses or the footnotes of his terms&conditions.
Well, it was just a way to let your hear that you'd better keep your researches private, to finally share only result of.
Who knows ? Your draft today may be a Nobel prize tomorrow.
also why don't you use splines instead of regression ? i think it is superior because a regression can "overfit" the data while splines are more 'natural' i guess
I gave examples of regression models in earlier posts, but in this case the model is a classifier network, so "instead of regression" doesn't apply here.
On a sidenote: Of course, the underlying internal method "inside the blackbox" of any neural network usually is iterative gradient descent, which I admit is very similar to regression, even with binary network outputs. True binary internal processing is not possible because the hardstep activation function is not differentiable.
Apart from this being a classifier model at least at the level of the equations being solved, I think you're wrong about splines versus regression, because the purpose of splines is interpolation. Fitting curves is what splines are made for! They just fill the gaps between datapoints, but for the original datapoints there still is a perfect match!
You could of course skip some of the original datapoints. If you don't, you'll get the segments that perfectly overlay the training samples, which is the most extreme form of curvefitting. And if you do skip datapoints, then which rule do you use? Even if you come up with a good rule, the left-over datapoints are still exactly part of the training samples, so there is no averaging element.
I think splines are mostly useful for drawing complex curves with only a handful of datapoints.
How exactly did you think of using splines in the context of neural networks? Input data pre-processing? Training set augmentation? Please give a concrete example.
My newest neural network gimmick, achieved by using the Canvas library with the bitmap-label function and PixelSet:
I added a tool for real-time visualization of all neuron activations with a color-code, layers (input-->hidden-->output) from left to right
(green=positive, red=negative, blue=zero, gray=dropout, magenta=NaN, black=dead); one color block represents one neuron, here shown with 6 hidden layers, 2660 neurons all in all.
In this example the hidden neurons use a custom rectifier-type activation function with a very low likelihood of negative activations, which is why you don't see much "red" color in this example,
but I think you can observe very well how the "dropout" is working (--> gray blocks= neurons masked by dropout).
I think it can be quite useful for a quick detection of problems within the network architecture at the beginning of a training and for a quick re-check after completed training.
I'm suprised how little it affects performance, but of course I can also turn the feature off when not needed (and for training in non-visual mode this part of the code is ignored anyway).
(click on image if it doesn't play as a .gif)
I know that your main aspect has been forex, but would you consider training on stocks? And would you consider training on the fundamental accounting data and not only price. I think that could be interesting although im sure it would go over my head. But still im sure you could start a hedge fund or something.
I am currently still looking at the price patterns for fun but it is unlikely that I will make profit from it. However of coarse in terms of investing savings over time we can analyze stocks for stability in earnings and value. eg. maybe goldman sachs has a good PE ratio and therefore can as an asset yield good returns or maybe Microsoft has a bad PE ratio but is stable and has a sudden sell off which is unlikely to stay low for more than a few months and therefore a profit opportunity.
And to further complicate the situation if you saving monthly or able to rebalance a portfolio then you do not have to be stuck in one place and can still have further decisions to be made and maybe an AI could do this.
Hi Brian,
I think you're absolutely right. Training on stocks or even better a portfolio mix of stocks would be interesting. The code should at least also work with CFDs without any changes. But as you mention, it could become very interesting once fundamentals are introduced, too.
Do you (or anybody else) know of any good method how to import fundamental data (and also past(!) data for training/testing) into Metatrader ? Changing the entire infrastructure and using something other than MT5 at this point seems like a huge undertaking and I'm not willing to go down that route at the moment.
Hi Brian,
I think you're absolutely right. Training on stocks or even better a portfolio mix of stocks would be interesting. The code should at least also work with CFDs without any changes. But as you mention, it could become very interesting once fundamentals are introduced, too.
Do you (or anybody else) know of any good method how to import fundamental data (and also past(!) data for training/testing) into Metatrader ? Changing the entire infrastructure and using something other than MT5 at this point seems like a huge undertaking and I'm not willing to go down that route at the moment.
I am afraid you will hardly find free data for stocks.
Your neural network is entirely coded with mql5 ? (sorry if you already answer that but I didn't read all the posts of the topic).