I have re-arranged the code to try and fix your problem. This may or may not fix the problem. Try v1_1.
Don't forget to save the Include.mqh file in your include folder
Downloaded the results, noticed that:
Short positions (won %) 72 (44.44%) Long positions (won %) 80 (77.50%)
Great result for Long posiitions:) I'll take a look at the expert...
What am I making wrong???
I tested the expert for the same period with same settings but i got completely different results:
First, thanks for your work and the EA.
I've been fooling around with this idea for a long time using cobbled-together EA's.
What I've learned is that this can be a very profitable strategy, but if you use any lot multiplier you can quickly get in trouble in a ranging market. No lot multiplier (meaning a lot multiplier of "1") works best, meaning using the same size lot for each trade. Leave all trades open until you have a net profit and then close all open and pending trades.
Another problem with a multiplier is that as you add lots, you're adding leverage. This can work both for and against you in that you may hit your profit target, but by the time you've closed out your positions you may have a loss in a fast market. Being highly leveraged can cause a profit to turn to a loss quickly if volatility is up.
I would also like to suggest the option for "no indicator", meaning a pure grid system based on price action alone.
I may be speaking out of turn as I haven't tried the EA yet, but another suggestion is that the EA leave all existing trades open when the indicators suggest a trend change.
I'm eager to try your EA.
You just have different historical data than I do. Your test was run on a different server. This is why I said take it for what it's worth. (which probably isn't much)
The strategy tester is a nice tool to use, but not reliable. How else do you explain 2 separate tests run with the same parameters with such different results?
The strategy tester is great to see if an EA is running properly, and to help zero in on the proper external variables to use. Unfortunately, that is probably all it's good for.
The way the "multiplier" works is this:
if Double_Lotsize=false, then first order will = Start_Lot_Size, each additional order will ADD Lot_Size_Increment to the last order's lot size.
if Double_Lotsize=true, then first order will = Start_Lot_Size, each additional order will be DOUBLE the previous order, and Lot_Size_Increment is ignored.
(A risky way to go)
If you want to have the same lot size every trade set Double_Lotsize=false, and Lot_Size_Increment=0.
As the EA works now, ALL the indicator does is decide which direction the first trade starts. After the first trade it does nothing, until all trades close, then the indicator is used for direction of the new progression.
Any and ALL ideas are welcomed. Thanks for your input.
This backtests just fine and I'm demoing it on the Euro.
Lot size = 0.1, no incrementing, MA=1 on 1H. TP = .01.
Already showing profit in less than an hour.
If you could add MM as an option that would make it even better..!
Like to see your forward test after a day.
You want MM for lot sizing?
Yes, especially as you already have a TP based on equity %.
I'll post results after it's run for a few days.
Appears to be a bug..
Please see attached screenshot.
Grid size set at 12; you can see it stopped taking trades at .4814.
Max Trades set to 20, so that's not the issue.
I have it trading on another platform (same broker) with the same settings and it took the trades.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.