Suggestions for EA (Loosing to Profit) - page 13

 

Доброго времени суток уважаемые форумчане!

Меня зовут Герман, мне 23 года, я являюсь трейдером компании "Инстафорекс"

Помогите в поиске нужного скрипта! Скрипт нужен для сетки отложенных ордеров.

 
danjp:

I implemented your reversal code. I did a fast hack job just to do a quick test, If the 30 || 60 was 2 STD's then reverse the trades. Results were horrible.

Changing it to 3 std, or 4, would you think that would still give horrible results?


At a certain std, it should pull back?

 
danjp:

I merged my lastest code into your code. I added the following:

A stack feature, if you want to trade 1 position just set stack to 1, the default is 5 in the code. DistanceApart is the distance between trades, if you change the default, which is 5 to 15 your win percentage will go up to 40-45% on a 5 stack

An AllowTradingHours bool to regulate which hours your EA trades. You can check the setting on one of the reports I am going to put up. I ran a bunch of tests those hours seamed about the average for best hours to trade for this EA.

I implemented your reversal code. I did a fast hack job just to do a quick test, If the 30 || 60 was 2 STD's then reverse the trades. Results were horrible. You may want to tweak that and run more tests. You can turn that off with your bool. Also, check to make sure I coded that right! I did it as an afterthought in a few minutes when I read this post again. To answer your final question, I don't think this make much sense in your case, but test it for yourself.

Added a bunch of code to deal with closing open and pending orders because of the stack feature.

Feel free to toss it, change it, make it better etc. I'm going to attach the code to this message, I'll put up some of the result. EURUSD seamed to be the best one I tested. You may want to pick another pair and do some testing on it see if you can get good result with another pair.

Thank you for this
 
c0d3:

Changing it to 3 std, or 4, would you think that would still give horrible results?


At a certain std, it should pull back?


I'm not sure, test it and let me know. In theory I think the reversal should be able to work. On some pair I tested I got really bad results so I reversed the logic to Sell on a Buy signal. I figured the results might be better but they were worse. I also remember testing the EURUSD without the 30MA just using the 60 and it workd better then using both. Could be a fluke, maybe you want to try a 60 and 240 as well. Just rambling here, instead of a reversal you might just want to shut it down for a certian amount of time or until the next day. Just a thought. Also, have you ever tested using smaller timeframes instead of the longer ones? For example use the 5 min and 1 min to trade the 15. I know the books say use the longer timeframes?
 
c0d3:
I wanted to add: thanks to everyone that is contributing to this post! I think little by little, this EA can turn into a potentially profitable EA.
Forex Trading Scams is any trading scheme used to defraud traders by convincing them that they can expect to gain a high profit by trading in the foreign exchange market.These scams might include churning of customer accounts for the purpose of generating commissions, selling software that is supposed to guide the customer to large profits, improperly managed, false advertising, Ponzi schemes
 
danjp:


finally the besst win % could get.

Strategy Tester Report
MTFzMovingvAverage
FXCM-Demo (Build 406)


SymbolEURUSD (Euro vs US Dollar)
Period15 Minutes (M15) 2011.01.03 00:00 - 2011.10.13 23:45 (2011.01.03 - 2011.10.14)
ModelEvery tick (the most precise method based on all available least timeframes)
ParametersenableSTDcheck=true; sMultiple=5; fMultiple=5; risk=0.3; reward=1.2; Stack=5; DistanceApart=15; tradingTimeFrame=60; entryTF=15; AllowTradingHours=true; OpenHour=11; CloseHour=17; lots=0.02; slowMovingPeriod=25; fastMovingPeriod=150;
Bars in test13280Ticks modelled8851007Modelling quality90.00%
Mismatched charts errors3
Initial deposit1000.00
Total net profit914.29Gross profit2296.56Gross loss-1382.26
Profit factor1.66Expected payoff4.62
Absolute drawdown193.63Maximal drawdown416.22 (19.07%)Relative drawdown27.01% (298.47)
Total trades198Short positions (won %)69 (33.33%)Long positions (won %)129 (51.94%)
Profit trades (% of total)90 (45.45%)Loss trades (% of total)108 (54.55%)
Largestprofit trade56.81loss trade-31.23
Averageprofit trade25.52loss trade-12.80
Maximumconsecutive wins (profit in money)12 (145.90)consecutive losses (loss in money)16 (-222.94)
Maximalconsecutive profit (count of wins)277.80 (6)consecutive loss (count of losses)-222.94 (16)
Averageconsecutive wins6consecutive losses7

This is not bad at all, for an M15.

What this system needs is to see which lowest timeframe it can settle in, and I will think M15, is indeed the way to go for. If this is all true, why not just stick to this and work on optimize on this version - I think you WILL get your Holy Grail, at least big chunks of it. Don't run around too much, stick to this one, make some real money - is my honest recommendation to everyone.

 
qjol:
MarketInfo(Symbol(),MODE_TICKVALUE)
Must be used as a ratio
double  PointValuePerLot(string pair=""){
    /* Value in account currency of a Point of Symbol.
     * In tester I had a sale: open=1.35883 close=1.35736 (0.0147)
     * gain$=97.32/6.62 lots/147 points=$0.10/point or $1.00/pip.
     * IBFX demo/mini       EURUSD TICKVALUE=0.1 MAXLOT=50 LOTSIZE=10,000
     * IBFX demo/standard   EURUSD TICKVALUE=1.0 MAXLOT=50 LOTSIZE=100,000
     *                                  $1.00/point or $10.0/pip.
     *
     * https://forum.mql4.com/33975 CB: MODE_TICKSIZE will usually return the
     * same value as MODE_POINT (or Point for the current symbol), however, an
     * example of where to use MODE_TICKSIZE would be as part of a ratio with
     * MODE_TICKVALUE when performing money management calculations which need
     * to take account of the pair and the account currency. The reason I use
     * this ratio is that although TV and TS may constantly be returned as
     * something like 7.00 and 0.0001 respectively, I've seen this
     * (intermittently) change to 14.00 and 0.0002 respectively (just example
     * tick values to illustrate).
     * https://forum.mql4.com/43064#515262 zzuegg reports for non-currency DE30:
     * MarketInfo(Symbol(),MODE_TICKSIZE) returns 0.5
     * MarketInfo(Symbol(),MODE_DIGITS) return 1
     * Point = 0.1
     * Prices to open must be a multiple of ticksize */
    if (pair == "") pair = Symbol();
    return(  MarketInfo(pair, MODE_TICKVALUE)
           / MarketInfo(pair, MODE_TICKSIZE) ); // Not Point.
}
 
syedi:
Forex Trading Scams is any trading scheme used to defraud traders by convincing them that they can expect to gain a high profit by trading in the foreign exchange market.These scams might include churning of customer accounts for the purpose of generating commissions, selling software that is supposed to guide the customer to large profits, improperly managed, false advertising, Ponzi schemes
ok, lol
 
danjp:

Just a thought. Also, have you ever tested using smaller timeframes instead of the longer ones? For example use the 5 min and 1 min to trade the 15. I know the books say use the longer timeframes?
I didn't test lower timeframes, i figured that i don't want to play around with small TP and SL values
 
Yesterday, I turned off the Demo, and started with the LIVE testing with 0.01 lots and 1:1 RR Ratio
Reason: