Why is it that BOOM and CRASH indexes can not respect Stop and Take profit levels - page 2

 
Amos Tsopotsa #:i have picked up a few ideas that has made the broker delay the movement of candles ,i wont be surprised with that as this is a computer based system which they can at anytime change how the candles move, to me its just a betting system 
It seems you have decided to ignore my explanation of why, and instead focus on something completely unrelated. I will leave you then to your own thoughts.
 
it comes to the main question i have raised what does after 100 ticks a spike will occur, a spike will happen after 500 ticks etc...,during the course of the week i created a custom indicator, that focuses on the movement of ticks and not bars, for instants ,on boom 1000 there are around 15 ticks before a spike happens, during the development i got an idea of adding the tick prices with say RSI levels, I will share the code just now, but i do notice that ,some more improvements have to be done on my code ,last time i explained that at some point, the tick levels disappear, I am working on this but if there is anyone else out there who can improve this code i am very sure that we have a 99% chance to predict these spikes before they happen
 
Fernando Carreiro #:
It seems you have decided to ignore my explanation of why, and instead focus on something completely unrelated. I will leave you then to your own thoughts.

thats not the idea i am hoping to find a way we can merge this thread to yours as well ,i shared my 2 codes so far and there is no response from you around that ,is there a way mql5 can merge topics of the same nature to one thread or discussion 

 
Amos Tsopotsa #: thats not the idea i am hoping to find a way we can merge this thread to yours as well ,i shared my 2 codes so far and there is no response from you around that ,is there a way mql5 can merge topics of the same nature to one thread or discussion 
I was not talking about my thread! I am referring to the answer to your primary question. Why do stops not work? Because of slippage. Spikes and drops are slips in price. No stop can prevent that. It is as simple as that.
 
Fernando Carreiro #:
I was not talking about my thread! I am referring to the answer to your primary question. Why do stops not work? Because of slippage. Spikes and drops are slips in price. No stop can prevent that. It is as simple as that.

my idea is there are price resets at certain levels this is my approach 

 
Amos Tsopotsa #: my idea is there are price resets at certain levels this is my approach 

And? No matter what approach you take, you will ALWAYS suffer a slippage on the stops. All you can do is include them as part of your risk management.

 
its possible if mql5 can allow us to make recommendations on how we can code ,its only works on back test where the stop losses are closed but on real its not the case ,since the broker is using mt5 this is very possible we need certain parameters to be taken into consideration 
 
have you tested the first code i shared with you around this idea ,there is a lot of work i have been doing its only that MQL5 is either too laid back on the requests we have made around this issue 
 
Amos Tsopotsa #: its possible if mql5 can allow us to make recommendations on how we can code ,its only works on back test where the stop losses are closed but on real its not the case ,since the broker is using mt5 this is very possible we need certain parameters to be taken into consideration 

You are failing at the most basic of trading practices. No one can prevent slippage.

It only seems to work in the Strategy Tester because the tester has a flaw. Please read the following posts ... 

Forum on trading, automated trading systems and testing trading strategies

Optimization has a Drawdown of 23% but "run single test" returns 87% DD

Fernando Carreiro, 2022.07.25 20:50

Unfortunately it is incorrect to say that S/L and T/P are properly handled. Not even when using "Real Ticks" does the Strategy Tester properly handle T/P and S/L.

The tester will always have the T/P and S/L triggered at the EXACT prices, irrespective of the actual quote prices, thus NEVER suffers slippage. The same problem applies to pending orders.

That is why back-test results of so many EA's that use pending orders or broker-side T/P and S/L, always giver better results in the Strategy Tester then on a live account.


Forum on trading, automated trading systems and testing trading strategies

Question about slippage affecting TP or SL

Fernando Carreiro, 2022.06.01 02:10

The only way (that I have found based on experience) to reduce slippage on the Stop-loss or Take-profit, is not to use broker-side stops, but instead, have the EA manage the exit conditions (virtual stops).

It cannot eliminate slippage entirely, but it can mitigate negative slippage to a good degree, by having the EA monitor the price movement and the spread and only exit when the conditions are more favourable, instead of immediately exiting a position as soon as the target prices are hit (as is the case of broker side stops).

To accomplish this, however, requires good coding skills and well planned exit rules, considering all possible conditions and actions to take.

Forum on trading, automated trading systems and testing trading strategies

Is the backtest information correct?

Fernando Carreiro, 2022.03.27 13:14

Unfortunately, any EA relying on pending orders or broker stops (S/L & T/P) will seriously be misrepresented in the Strategy Tester and on the most part it will be more favourable than on live trading, especially when running the test with tick values.

The reason is as follows — the tester will take pending orders and the stops at the exact prices they are set to be triggered instead of the real quote value of the test market at the time. Even if in the tester the quote price would cause slippage, it still marks them as been taken at the trigger price.

For my own EAs, I never use pending orders and implement virtual stops to get a more realist back test, and the difference is always very noticeable. Here is a reference to another thread in which a user notice the same problem in his back-testing and my answer to the problem:


Forum on trading, automated trading systems and testing trading strategies

Calculate the stop loss at the close of the candle

Fernando Carreiro, 2022.03.26 01:00

Ok, now I understand the issue, but unfortunately all we have discussed so far has nothing to do with it nor will it solve the problem.

The issue is that the Strategy Tester will take the S/L and T/P at the exact price you set it instead of the real price slippage. The same also happens for the opening price of pending orders.

This is a real problem which MetaQuotes has never corrected and it has been like that even in MT4 (and it also makes back tests of Market products look very nice in the Strategy Tester, but bad in live trading).

The only solution I have come up with, is to implement virtual stops that are handled within the code (instead of the broker/tester side), that simulates the stops being hit and closes the positions when the target stops are reached.

In my own EAs I do the following:

  • I add an offset (a fixed amount of points, a very large size) to all my stops when the order is placed. For example, I add an extra 10000 points to the real stop price.
  • Then in the code, I monitor the trades and read the current stops (from open positions) and subtract the offset from their distances (the 10000 points) to get the real stop prices.
  • I then check if the Bid (for buys) or Ask (for sells) has reached those real stops.
  • If they are indeed hit, I then close the positions in the code and in this way, the positions are closed at the real prices with slippage.

When the EA is trading live, all I do is set the virtual stop offset to 0, instead of 10000 for the Strategy Tester.

The reason I use this offset is so that I still have the stops information stored with the order and position and I don't need to keep an internal cache of the data of the real stops. It is all stored within the normal trading records but just offset in value.

The value I choose, for example 10000, is so that the stops don't get accidentality triggered (in the tester system) by a very big spike in spread or slippage and also because it is a "nice" number and easy to calculate visually when reading the test reports.

I hope you will be able to understand all this process. However, for a beginner it may be difficult to implement, as it requires a higher level of coding skills.

 
Fernando Carreiro #:

You are failing at the most basic of trading practices. No one can prevent slippage.

It only seems to work in the Strategy Tester because the tester has a flaw. Please read the following posts ... 

is this flow caused by the broker or the service provider of the platform 

Reason: