Do you have a smilely face on the chart?
- it is not adjust for 4/5 digit brokers.
- Do you have an ECN broker account ?
- Have you learned yourself some basic coding mq4 from book and code exampels ?
Do you have a smilely face on the chart?
- it is not adjust for 4/5 digit brokers.
- Do you have an ECN broker account ?
- Have you learned yourself some basic coding mq4 from book and code exampels ?
Yes, live trading is enabled, and there is a smiley face on the chart. However, even when backtesting/optimizing, there are 0 total trades.
1. Is there any coding adjustment needed, or just the parameters need to be changed to reflect the change. Example - a Stop Loss of 5/50 for a 4/5 digit broker, respectively.
2. I use FX Solutions as my broker which is a 4 digit, fixed spread broker with no ECN accounts. http://www.broker-review.com/fx-solutions/
3. I am making the move from FXCM Strategy Trader which used C#, so I have been trying to learn MQL4 as I go.
Any suggestions?
After attempting to optimize, I get this in the Journal which looks pretty normal to me:
2012.09.06 15:04:41 There were 10 passes done during optimization
2012.09.06 15:04:41 TEMA_EMA_Cross: optimization stopped
2012.09.06 14:51:02 TEMA_EMA_Cross: optimization started
In this test, I just let the Take Profit range from 2-20 with a step of 2.
I'm assuming the issue lies somewhere with using the custom indicator. It may not be coded correctly. When using this same strategy as a 2 line EMA cross, I get results just fine.
After attempting to optimize, I get this in the Journal which looks pretty normal to me:
2012.09.06 15:04:41 There were 10 passes done during optimization
2012.09.06 15:04:41 TEMA_EMA_Cross: optimization stopped
2012.09.06 14:51:02 TEMA_EMA_Cross: optimization started
In this test, I just let the Take Profit range from 2-20 with a step of 2.
I'm assuming the issue lies somewhere with using the custom indicator. It may not be coded correctly. When using this same strategy as a 2 line EMA cross, I get results just fine.
So basically you don't have a clue what you are doing
If you read my last message again and you understand the code lines then you would have know that with a choice of takeprofit < 10 the EA is not working
Uncheck optimization and do normal backtest..... ( no optimization )
So backtest again and look inside journal the messages you get
like to know if there are and what kind of messages you read there
Although I am no expert by any means, I understand that when the takeprofit is less than 10 the return(0) is triggered, and the EA goes back to start() causing no trades to be taken. I'm merely testing the EA as well as my understanding of the coding which is why I let it also test values above 10.
When I run a normal backtest, I get the following Journal entry repeated (with an updated timestamp): 2012.09.06 15:59:24 2012.08.30 23:59 TEMA_EMA_Cross EURUSD,M15: 5
I appreciate your help. Thank you.
# | Time | Type | Order | Size | Price | S / L | T / P | Profit | Balance |
1 | 2012.02.01 00:02 | buy | 1 | 1.00 | 1.30840 | 1.30690 | 1.31840 | ||
2 | 2012.02.01 03:03 | s/l | 1 | 1.00 | 1.30690 | 1.30690 | 1.31840 | -157.00 | 9843.00 |
3 | 2012.02.01 17:05 | sell | 2 | 1.00 | 1.31777 | 1.31927 | 1.30777 | ||
4 | 2012.02.01 17:09 | s/l | 2 | 1.00 | 1.31927 | 1.31927 | 1.30777 | -157.00 | 9686.00 |
5 | 2012.02.01 17:19 | buy | 3 | 1.00 | 1.31778 | 1.31628 | 1.32778 | ||
6 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31780 | 1.32778 | ||
7 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31783 | 1.32778 | ||
8 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31786 | 1.32778 | ||
9 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31788 | 1.32778 | ||
10 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31791 | 1.32778 | ||
11 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31794 | 1.32778 | ||
12 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31797 | 1.32778 | ||
13 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31800 | 1.32778 | ||
14 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31803 | 1.32778 | ||
15 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31805 | 1.32778 | ||
16 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31808 | 1.32778 | ||
17 | 2012.02.01 18:02 | modify | 3 | 1.00 | 1.31778 | 1.31811 | 1.32778 |
It is trading in backtester ......
What settings did you try ???
As you can see I did this on 5 digit account with
Parameters | TakeProfit=1000; StopLoss=150; Lots=1; TrailingStop=250; TEMA=21; EMA=64; |
I tried simulating your backtest above on my 4 digit account and only came out with 1 trade. I have imported data through the History Center, but for some reason it seems as if my backtesting models much less data than yours does. Am I missing something else?
Strategy Tester Report
TEMA_EMA_CrossFXSolutions-Demo Server (Build 432)
Symbol EURUSD (Euro vs US Dollar)
Period 1 Hour (H1) 2012.08.29 21:00 - 2012.08.30 23:00 (2012.02.01 - 2012.08.31)
Model Every tick (the most precise method based on all available least timeframes)
Parameters TakeProfit=100; StopLoss=15; Lots=1; TrailingStop=25; TEMA=21; EMA=64;
Bars in test 1029 Ticks modelled 4986 Modelling quality 90.00%
Mismatched charts errors 0
Initial deposit 10000.00
Total net profit -150.00 Gross profit 0.00 Gross loss -150.00
Profit factor 0.00 Expected payoff -150.00
Absolute drawdown 150.00 Maximal drawdown 380.00 (3.71%) Relative drawdown 3.71% (380.00)
Total trades 1 Short positions (won %) 0 (0.00%) Long positions (won %) 1 (0.00%)
Profit trades (% of total) 0 (0.00%) Loss trades (% of total) 1 (100.00%)
Largest profit trade 0.00 loss trade -150.00
Average profit trade 0.00 loss trade -150.00
Maximum consecutive wins (profit in money) 0 (0.00) consecutive losses (loss in money) 1 (-150.00)
Maximal consecutive profit (count of wins) 0.00 (0) consecutive loss (count of losses) -150.00 (1)
Average consecutive wins 0 consecutive losses 1
# Time Type Order Size Price S / L T / P Profit Balance
1 2012.08.29 21:24 buy 1 1.00 1.2539 1.2524 1.2639
2 2012.08.30 10:37 s/l 1 1.00 1.2524 1.2524 1.2639 -150.00 9850.00
1 trade
That is not enough for doing backtesting or optimizations
Difference in test
.....................
Bars in test | 4647 | Ticks modelled | 13293930 |
Your test Bars in test 1029 Ticks modelled 4986
Your testing was not more ticks ??? Model: Every Tick ??
=================================
total = OrdersTotal(); if(total < 1)
A big problem you have with this EA is that it only open trades if OrdersTotal() is zero
If you have this EA running on your account it can't trade if there is already an open trade manually or from other EA
====================================
For trailing this EA is also checking your trades but it is not checking MagicNumber() EA
it will also trail open trades with same OrdersSymbol()
...........................................................
and it is counting up the loop in this case it will work but if you also close trades inside the loop of checking
then you need to count down for checking trades Make it common to count down checking Trades if you make your own EA
====================================
And also you get problems if you wanna use it as well for 4 as 5 digit brokers and ECN accounts
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I tried creating a 2 line cross EA using a custom indicator (Triple EMA or DEMA) crossing an EMA, but it does not make trades; however, the EA compiles just fine. If someone could review the coding below and help me out, I would really appreciate it. Thanks.
EA:
TEMA:
Thanks again in advance.