Discussion of article "Extract profit down to the last pip" - page 22

 
fxsaber:

I waited. The trade is halted.

What do you mean, who stopped it?
 

every tick in MT4.


Do you believe this negatively impacted performance? Considering that you were working with some synchronisation mechanism.

Do you believe this negatively impacted performance? considering you ran with some synchronizing mechanism.

 
Enrique Dangeroux:

Do you think this had a negative impact on performance? Given that you were working with some sort of synchronisation mechanism.

No. It doesn't seriously affect synchronisation. Objectively, the EA started to perform at a loss. This is what the Tester shows.


Unfortunately, I have not been able to write a criterion that would show a significant difference between the unprofitable October and the profitable months before that.

The weighted average spread, potential profit and other characteristics did not show significant differences from the previous indicators.


I really hope to create a criterion that would show the difference between October and other months. Of course, the Expert Advisor itself cannot be such a criterion.

 

Around 2018-10. It was also an unfavourable period for the algorithm. I wouldn't be surprised if this is a similar period and if it works for a while, the algorithm will work again.

I hope you can find an explanation.

Around 2018-10 there also was unfavourable period for the algorithm. I would not be surprised if this is similar period and given some time, the algorithm will perform profitable again.

I hope you will find explanation.

 

How markup affects profit.


In theory, in case of negative markup (prices improve) at the same TS settings, its expectation should increase by double markup if trading signals are repeated.

For example, there was a profit of 20000 pips at 1000 trades. We made markup -1 pip (Bid -= -1pips, Ask += -1pips). Then MarkupProfit = 20000 - 1000 * (-1 ) * 2 = 22000 pip.


But markup affects the prices, on which the trading logic depends, so the signals will not be repeated. Moreover, when optimised, the TS should adjust even better. Because in the example above, a pass must be found that has a profit of more than 22000 pips with a larger number of trades. I.e. the expectation will decrease (because it is more profitable to catch smaller movements), but the profit will increase.


This is all in theory. But how to do it in practice? MT5 makes it very easy to conduct such research.

So, seven symbols are created with the following markups: -3, -2, -1, 0, +1, +2, +3 pips. The source material is a real symbol. The zero markup is the same without modifications.

Optimisations were performed on each - seven pieces. The best settings were taken from each optimisation and a run was made with them on all symbols. Thus, the following table was filled in.


Result

What markup
corresponds to
best settings
Markup
-3 pips
Markup
-2 pips
Markup
-1 pip
Markup
0 pips
Markup
+1 pip
Markup
+2 pips
Markup
+3 pips
Markup
-3 pips
Profit: 18891
Trades: 1348
MO: 14.01
PF: 2.38

Profit0: 10797
Profit: 16165
Deals: 1198
MO: 13.49
PF: 2.21

Profit0: 11369
Profit: 14904
Deals: 1067
MO: 13.97
PF: 2.15

Profit0: 12771
Profit: 12686
Deals: 897
MO: 14.14
PF: 2.03

Profit0: 12686
Profit: 10255
Deals: 757
MO: 13.55
PF: 1.87

Profit0: 11771
Profit: 8728
Deals: 647
MO: 13.49
PF: 1.77

Profit0: 11316
Profit: 5759
Deals: 547
MO: 10.53
PF: 1.50

Profit0: 9041


Markup
-2 pips
Profit: 16430
Deals: 1089
MO: 15.09
PF: 2.27

Profit0: 9899
Profit: 16832
Deals: 1045
MO: 16.11
PF: 2.37

Profit0: 12654
Profit: 14893
Deals: 938
MO: 15.88
PF: 2.25

Profit0: 13019
Profit: 11478
Deals: 812
MO: 14.14
PF: 1.97

Profit0: 11478
Profit: 9110
Deals: 705
MO: 12.92
PF: 1.79

Profit0: 10518
Profit: 7386
Deals: 618
MO: 11.95
PF: 1.66

Profit0: 9857
Profit: 6333
Deals: 547
MO: 11.58
PF: 1.59

Profit0: 9616
Markup
-1 pip
Profit: 15566
Deals: 1863
MO: 08.36
PF: 1.84

Profit0: 4396
Profit: 14696
Deals: 1588
MO: 09.25
PF: 1.87

Profit0: 8337
Profit: 14806
Deals: 1313
MO: 11.28
PF: 2.01

Profit0: 12184
Profit: 10603
Deals: 968
MO: 10.95
PF: 1.80

Profit0: 10603
Profit: 9422
Deals: 752
MO: 12.53
PF: 1.79

Profit0: 10926
Profit: 6506
Deals: 591
MO: 11.01
PF: 1.55

Profit0: 8870
Profit: 7129
Deals: 494
MO: 14.43
PF: 1.7

Profit0: 10092
Markup
0 pips
Profit: 16033
Deals: 1457
MO: 11.00
PF: 2.20

Profit0: 7285
Profit: 15279
Deals: 1350
MO: 11.32
PF: 2.16

Profit0: 9882
Profit: 13638
Deals: 1217
MO: 11.21
PF: 2.05

Profit0: 11208
Profit: 13137
Deals: 1068
MO: 12.30
PF: 2.12

Profit0: 13137
Profit: 12244
Deals: 952
MO: 12.86
PF: 2.10

Profit0: 14146
Profit: 10415
Deals: 822
MO: 12.67
PF: 1.95

Profit0: 13702
Profit: 8815
Deals: 712
MO: 12.38
PF: 1.83

Profit0: 13086
Markup
+1 pip
Profit: 14246
Deals: 1219
MO: 11.69
PF: 2.04

Profit0: 6936
Profit: 13248
Deals: 1026
MO: 12.91
PF: 2.08

Profit0: 9141
Profit: 11464
Deals: 818
MO: 14.01
PF: 1.97

Profit0: 9824
Profit: 12197
Deals: 679
MO: 17.96
PF: 2.21

Profit0: 12197
Profit: 10834
Deals: 655
MO: 16.54
PF: 2.07

Profit0: 12143
Profit: 9331
Deals: 627
MO: 14.88
PF: 1.91

Profit0: 11837
Profit: 7971
Deals: 540
MO: 14.76
PF: 1.80

Profit0: 10130
Markup
+2 pips
Profit: 15617
Deals: 1152
MO: 13.56
PF: 2.32

Profit0: 8709
Profit: 12717
Deals: 942
MO: 13.50
PF: 2.08

Profit0: 8949
Profit: 11016
Deals: 732
MO: 15.05
PF: 2.04

Profit0: 9552
Profit: 11617
Deals: 575
MO: 20.20
PF: 2.31

Profit0: 11617
Profit: 10923
Deals: 565
MO: 19.33
PF: 2.22

Profit0: 12051
Profit: 9876
Deals: 551
MO: 17.92
PF: 2.08


Profit0: 12077
Profit: 7484
Deals: 444
MO: 16.86
PF: 1.86

Profit0: 10149
Markup
+3 pips
Profit: 16626
Trades: 1491
MO: 11.15
PF: 2.17

Profit0: 7678
Profit: 13294
Deals: 1176
MO: 11.30
PF: 2.03

Profit0: 8584
Profit: 11486
Deals: 913
MO: 12.58
PF: 1.96

Profit0: 9659
Profit: 11271
Deals: 713
MO: 15.81
PF: 2.10

Profit0: 11271
Profit: 9763
Deals: 682
MO: 14.32
PF: 1.94

Profit0: 11130
Profit: 8234
Deals: 651
MO: 12.65
PF: 1.78

Profit0: 10839
Profit: 8662
Deals: 517
MO: 16.75
PF: 1.91

Profit0: 11761


For example, cell (column; row) = (-2; +1) contains this data: an optimisation was performed for the +1 character and the best result settings were applied to the -2 character. I haven't seen a study like this anywhere, so it was very interesting. So, seven optimisations (for each character) and for all optimisations seven single passes.


Applied a multitester for full automation. The manual fiddling is filling out this table.

Profit0 is the theoretical profit on a real symbol, if the trading signals matched. The highlighted piece in the table is the best Profit0.


Conclusions.

Specially brought a lot of numbers so that you can see some "laws". It is clear that the study is not exact, because genetics was used during Optimisation. But roughly something can still be deduced.

  • As a rule, the more you worsen the prices for optimisation, the corresponding better pass on the real symbol gives higher PF and average deal. This is due to the fact that the number of trades drops a lot more than the profit.
  • It is possible to improve profits on a real symbol if you optimise on a degraded symbol by substituting the trading signals of the better pass into the real symbol. But this is probably an exception to the rule (need to check).
  • Basically, the theory is confirmed that optimisation on a native symbol almost always gives a better result than trading signals of the best passages of unmarked symbols.
  • To study the TS, it makes sense to run it on off-markup symbols.
  • The highlighted diagonal in the table perfectly demonstrates how much profit changes when the markup changes by just 1 pip. It is a good counter-argument for those who think that price difference by 1-2 pips does not seriously affect anything.
 

Colleague, very interesting research!

But when comparing, imho, some values that form a set of values, it is necessary to use statistical methods.

As I understand, in this case the task is to determine whether the markup affects the performance of the system.

Then:

  • H0 (null hypothesis): the results with and without the markup are equal. I.e. the addition of the markup has no effect on the system performance.
  • H1 (alternative): not equal. I.e. the addition of markup is of fundamental importance in determining the profitability.

I would also add that this:

Но маркап влияет на цены, от которых зависит торговая логика, поэтому сигналы повторяться не будут...

will be levelled by the multiplicity of the number of elements of the population. I.e. it will be possible to compare two sets of results.

This is the opinion.
 
Denis Kirichenko:

When comparing, imho, some values forming a set of values, one should use statistical methods.

In this case, I don't quite understand how to statistically compare optimisation clouds obtained through genetics. Besides, the TC from the article is used here, and this is a very special case of TC.

As I understand, the task in this case is to determine whether markup affects the performance of the system.

The original task was different. It was to understand whether it is normal or not, when markup affects the entry points in the strongest way? Such a dependent trading logic is not very favourable to me. Unfortunately, the TS from the article is exactly with such logic.


ZЫ I added a point to the conclusion

Forum on trading, automated trading systems and testing trading strategies.

Discussion of the article "Scratching the profit to the last pip"

fxsaber, 2019.11.09 15:54

  • The highlighted diagonal in the table perfectly demonstrates how much profit changes when the markup changes by just 1 pip. A good counter-argument for those who think that a 1-2 pip price difference doesn't seriously affect anything.
 
fxsaber:

In this case, I don't quite understand how to statistically compare optimisation clouds obtained through genetics. Besides, the TC from the paper is used here, and this is a very special case of TC...

You can compare populations. Let's say there is sample 1 and sample 2. A statistical test can tell if they're the same or not.

When genetics calculates some combination of parameters at markup=0, and skips (nullifies) it at, let's say, markup=1, it is natural to compare such populations with a reservation. It is better when we compare the same combinations of parameter values at different markups.

The initial task was different. We had to understand whether it is normal or not, when markup has a strong influence on entry points. Such a dependent trading logic is not very favourable to me. Unfortunately, the TS from the article is exactly with such logic.

Well, that's what I wrote about hypotheses. I'll paraphrase:

  • H0 (null hypothesis): markup does not affect the result of the trading system.
  • H1 (alternative): markup affects the result of the trading system.
If the last thesis is confirmed, then the system is sensitive to additions to the initial price. And it is rather bad.
 
Denis Kirichenko:

It is better when we compare the same combinations of parameter values at different markups.

The table does just that. Each row has the same set of inputs.

Well, that's what I wrote about hypotheses. I'll rephrase it:

  • H0 (null hypothesis): markup does not affect the outcome of the trading system.
  • H1 (alternative): markup affects the result of the trading system.
If the last thesis is confirmed, then the system is sensitive to additions to the initial price. And it is rather bad.

It can be seen that in each line the profit falls from left to right, which is fully consistent with the theory. Moreover, the number of trades also falls in the same direction. Which just speaks in favour of the fact that the inputs are not taken the same, but more OPTIMAL. Well it's strange when the inputs don't change during markup. Here is the bottom line

Forum on trading, automated trading systems and testing trading strategies.

Discussion of the article "Scratching out the profit to the last pip"

fxsaber, 2019.11.09 15:54


Which markup
corresponds to
best settings
Markup
-3 pips
Markup
-2 pips
Markup
-1 pips
Markup
0 pips
Markup
+1 pip
Markup
+2 pips
Markup
+3 pips
Markup
+3 pips
Profit: 16626
Trades: 1491
MO: 11.15
PF: 2.17

Profit0: 7678
Profit: 13294
Deals: 1176
MO: 11.30
PF: 2.03

Profit0: 8584
Profit: 11486
Deals: 913
MO: 12.58
PF: 1.96

Profit0: 9659
Profit: 11271
Deals: 713
MO: 15.81
PF: 2.10

Profit0: 11271
Profit: 9763
Deals: 682
MO: 14.32
PF: 1.94

Profit0: 11130
Profit: 8234
Deals: 651
MO: 12.65
PF: 1.78

Profit0: 10839
Profit: 8662
Deals: 517
MO: 16.75
PF: 1.91

Profit0: 11761

    Looking at the extremes. Markup differs by 6 pips. At the same time the number of trades differs three times.


    Let's see what the profit would be if we trade on the right cell: (16.75 + 6 * 2) * 517 = 14863, which is clearly less than 16626 in the left cell. At the same time, look at the expectation in the left cell, it is less than double markup! I.e. everything is very logical. The TS caught a lot of small fluctuations, while the input parameters corresponded to the best pass on a very marked symbol. Such a property of the TS should not upset. But there are still some doubts.


    In principle, this is probably how any TS behaves, but we are not sure about it.

     
    fxsaber:
    • It is possible to improve the profit on the real symbol, if you optimise on the degraded symbol, substituting trading signals of the best pass into the real symbol. But this is most likely an exception to the rule (you need to check).

    I made a check through genetics using this criterion

    sinput int inMinTrades = 0; // Minimum number of trades (positions).
    
    double OnTester()
    {
      return((TesterStatistics(STAT_TRADES) > inMinTrades) ? (TesterStatistics(STAT_EXPECTED_PAYOFF) + GetMarkup(_Symbol) * 2) * TesterStatistics(STAT_TRADES) : 0);
    }

    I.e. I searched for the maximum profit for a real symbol, if the trade entries coincide. Here are the best passes for each symbol

    Which markup
    matches
    best settings
    Markup
    -3 pips
    Markup
    -2 pips
    Markup
    -1 pip
    Markup
    0 pips
    Markup
    +1 pip
    Markup
    +2 pips
    Markup
    +3 pips

    Profit: 14300
    Trades: 512
    MO: 2793
    PF: 2.70

    Profit0: 11228
    Profit: 17719
    Deals: 1169
    MO: 15.18
    PF: 2.21

    Profit0: 13043
    Profit: 13959
    Deals: 601
    MO: 23.23
    PF: 2.66

    Profit0: 12757
    Profit: 13137
    Deals: 1068
    MO: 12.30
    PF: 2.12

    Profit0: 13137
    Profit: 11449
    Deals: 1052
    MO: 10.88
    PF: 1.82

    Profit0: 13553
    Profit: 9891
    Deals: 839
    MO: 11.79
    PF: 1.83

    Profit0: 13247
    Profit: 7746
    Deals: 876
    MO: 8.84
    PF: 1.59

    Profit0: 13002


    It's clear that it's genetics. And, for example, the maximum that was in the original table was not found, which raises some questions for the GA...

    However, we can conclude that it probably does not make sense to consider trading entries from deteriorated symbols rather than to increase the profit, but to increase the mat expectation.