Creating a trading robot - page 25

 
Vitaly Muzichenko:

Well, that's the way it should be: we test in MT5, but trade in MT4. If you have tested in MT5, you will not see the picture with equity, which tends to fly into space, it can be shown only in MT4 with its deficiencies.

Forum on trading, automated trading systems and strategy testing

Difference calculus, examples.

Aleksey Panfilov, 2018.08.11 13:49

Added minimal binary adaptation as we trade, in the form of signal reversal depending on the sum of two previous signals.

And opening new trades only from late Monday to Thursday.

Advisor:2018_04_22_4P72_EA.
Symbol:EURUSD
Period:M1 (2014.02.14 - 2018.02.06)
Parameters:Lot=0.1
StopLoss=30000
TakeProfit=30000

Currency:USD
Initial deposit:100 000.00
Leverage:1:100
Backtest
Story quality:93%
Bars:1473084Tics:5855532Characters:1
Net profit:7 064.64Absolute drawdown on balance sheet:39.68Absolute drawdown on funds:51.16
Total return:14 433.00Maximum drawdown on balance:418.38 (0.39%)Maximum drawdown in funds:466.49 (0.43%)
Total loss:-7 368.36Relative drawdown on balance sheet:0.39% (418.38)Relative drawdown on funds:0.43% (466.49)
Profitability:1.96Expected payoff:9.76Margin Level:71535.24%
Recovery factor:15.14Sharpe Ratio:0.21Z-score:-0.01 (0.80%)
AHPR:1.0001 (0.01%)LR Correlation:0.98OnTester Result:0
GHPR:1.0001 (0.01%)LR Standard Error:464.84
Total trades:724Short trades (% of winners):344 (61.34%)Long trades (% wins):380 (60.00%)
Total trades:1319Profitable trades (% of all trades):439 (60.64%)Loss trades (% of all):285 (39.36%)
Largest profitable trade:377.19Largest losing trade:-213.07
Average profitable trade:32.88Average losing trade:-25.85
Maximum number of continuous wins (profit):11 (638.68)Maximum number of continuous losses (loss):10 (-316.04)
Max. continuous profits (number of wins):638.68 (11)Max. continuous loss (number of losses):-316.04 (10)
Average continuous winnings:3Average Continuous Losses:2

The expert himself.

 
Uladzimir Izerski:

In 19 seconds, the price can fly off by 150 4-digit points.

Every tick counts. The timeframe is not important. The price is indicated at any time.

It doesn't matter what timeframe analysis is carried out. The current price is important.

No. Let the price fly away even if it is 1500 four-digit ticks. We have TP and SL, and if the brokerage company is reliable, it will work fine. If unreliable... Well, unreliable one can just run away with your money.

Doesn't matter what's inside the bars. We only work with OHLC prices on all closed watches (when trading on watches), and make a decision solely on the first tick of each H1 bar. This is what "working on an hourly timeframe" means. If we analyse some other prices - then it's not trading on H1.

Alexander 2 says he collects ticks every 20 seconds, i.e. he works on 20S timeframe. Volchanskiy has 1s sampling - he works on 1S timeframe.

If every tick is counted, then it is called "working on ticks", not "on the timeframe".

So, the MT4 tester is designed to work on larger timeframes, not lower than H1. Exactly on those timeframes it gives results, which are very close to those of the MT5 tester. If you collect ticks every 20 seconds, or even more so if you analyse every tick - then you can only use the results of the MT4 tester as a rough approximation.

 
aleger:

You don't need a demo account, not yet. First you have to get the program to follow the current

and all subsequent trends from their beginning to the end, and do what's necessary

to deliver the required returns, and then everything else later.

Well, I'm not rushing it.

I said, "we wait." When it is, it will be.

 
Unicornis:

1. basic directional calculation on Open H1. Because when Open occurred, then Close (and other variations) of the previous bar has definitely occurred.

2.1 Main calculation of an entrance by Open M15-M5.

2.2 Refined calculation of an entering by the Open M1.

2.3 Refined entering by Last Price (ticks).

3. A grid entry of 5-10 Limits through 1 point (1-1/2 of the spread) on the risk tolerance of the TS.

Since intelligence is limited and prone to degradation, then 2.2 and 2.3 may be dropped.

This is trading on ticks.

The MT4 tester cannot be used here. Only MT5, and in"every tick based on real ones" mode.

 
khorosh:

Don't be so hard on the MT4 tester. Yes, the MT5 tester is better, but when it didn't exist, people created profitable Expert Advisors using the MT4 tester. That the report in MT4 should be on H1 and higher is a fake. The fact that ticks are emulated in the tester may affect adequacy of testing results of Pips Expert Advisors. If an Expert Advisor holds a position within several bars, the influence of ticks on the results is not significant. Depending on a mode of operation used in an Expert Advisor, I test by both - open prices and ticks. I do not test using the demo mode, it is for those who have much free time. Right after the Strategy Tester I start testing on cents real account. I have not noticed any significant differences between the Expert Advisor in the Strategy Tester and the real one. My last Expert Advisor (test results were shown here) was tested on cent real for 2 months already. The results are not much different from those in the tester. It was tested in the tester on ticks of M30.

I'm not criticizing it. I am simply reminding of its sphere of application. For people who trade on larger timeframes our argument will be strange because Expert Advisors that trade on the daily show almost the same trading results, both on МТ4 and МТ5. But tick-trading Expert Advisors differ too much.

The statement "I'm not testing on the demo, I'm going straight to the REAL price" is quite ridiculous. And what is that if not a demo? That is "demo-testing", because in this account you are holding an amount, with which you can easily say goodbye.

And if you have an Expert Advisor running on M30 - then the MT4 tester results on that timeframe are quite adequate, especially if there are no major shocks in the story.

 
Georgiy Merts:

And I'm not criticising it, I'm just reminding you of the scope of its application. For people who trade on large timeframes our argument will be strange, because Expert Advisors that trade on the day show practically the same trading results, both on MT4 and MT5. But tick-trading Expert Advisors differ too much.

This is quite ridiculous statement "I'm not testing on the demo, I'm going straight to the REAL price". And what is that if not a demo? That is "demo-testing", because in this account you keep an amount, with which you can easily say goodbye.

And if your Expert Advisor works on M30 then the results of the MT4 tester on this timeframe are quite adequate, especially if there are no strong shocks in the history.

The quality of your testing is not determined by the amount you keep in your account. Also the quality is higher on the cent account than on the demo account, it is closer to the real one in terms of requotes. I haven't dealt with demo accounts for a long time, but it seems that there were no requotes there before.

 
khorosh:

The quality of testing is not determined by the amount of money held in the account. And it is higher on a cent account than on a demo account, closer to the real one, at least in terms of requotes. I have not dealt with demo account for a long time, but it seems that there were no requotes there before.

The account balance is not really determined by the quality of testing, but only by your trust in your Expert Advisor (and partially by your security).

And about the fact that the cent account is closer to the real than the demo ... well... it's hard for me to judge, I have cent accounts - and there the performance is not much different from demo... Probably because I almost always use ECN accounts... So maybe you're right (let's be "you").

 

I read the whole thread - deaf as a super tank firing on every tick... what's your problem with ticks - do they give you profit....give me at least one good trade a day on any index with a 10p execution... I also like the trend following approach... For me it is when the price is down - TS opens sell stops, up - buy stops, flat - this and that, and nothing else is needed, and especially to bother with all 672 TS... like this, and it can be found on any Barabashkin code with pending orders... here myself only recently realised this too by accident...


 
Сергей Криушин:

I read the whole thread - deaf as a super tank firing on every tick....why are you so obsessed with ticks - do they give you profit....give me at least one good trade a day on any index with a 10p execution... I also like the trend-following approach... For me it's when price is down - TS opens sellstops, up - buystops, flat - this and that, and there is nothing else to do, and especially to bother with all 672 TS... like this, and it can be found on any Barabashkin code with pending orders...


Take away MM and overshoots from the code and the picture becomes deplorable :-( "green" should be strictly horizontal, and the blue one stumblingly stretches to the top without dangling "snot". If it is like that on a long stretch - then the TS is worth close attention

To check TS(entry/exit rules) - do the following: always enter the market with the same volume, and only to one side. The drawdown of equity and the holding time are artificially limited.

The point is that using MM, lots, nets and overbidding we can pull up anything, up to a "penny". That's what a lot of EAs are based on :-)

 
Maxim Kuznetsov:

Take away MM and overshoots from the code and the picture becomes deplorable :-( the "green one" should be strictly horizontal and the blue one should stumble to the top without dangling "snot". If it's like that on a long stretch - that's when the TC is worth a close look

To check the TS (entry/exit rules): always market with the same volume and only to one side. And the equity drawdown and holding time are artificially limited.

The whole point is that with MM, locks, nets and overbidding you can pull up anything, up to a "penny". That's what a lot of EAs are based on :-)

Well, you have gone too far in the ideal direction... I decided to see how it would work with minimal open positions... Of course, some of them hang when sharp changes and reversals in the other direction, they work out more or less well at flat, I need more effort here... to filter them... The main thing is the sense, and do it in such a way that it does not stay for the next day... mini scalper of sorts and in the theme of "let's do it" - maybe someone will make a perfect... and share...))