Download MetaTrader 5

Tick Indicator and EAs - page 24

To add comments, please log in or register
Sergey Golubev
Moderator
99794
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

MT4 & MT5 backtest

Sergey Golubev, 2017.02.17 20:53

If you are backtesting EA on MT5 using 'every tick based on real ticks' so it will be almost same with trading on MT5 platform with some particular broker (because it is based on actual historical data).

Example, read this thread: Why is it better MT5 than MT4?? Does it have fewer limitations ??? - this is the quote from the first post of the thread:

  • In MT5 you can backtesting robots with the closest possible conditions to the real market natively  (real tick data, real variable spreads, lag, slippage, etc). In MT4 you can't natively. You only can if you pay for a third-party software. If so, you also have to download history data from a few sources (there are many few, almost everyone uses the same source), transform it to MT4 format and open the platform through this third-party software in order to patch MT4 behavior. You take many hours to complete this process, and you have to repeat it every time you want to incorporate new data. 
    We have all seen hundreds of robots that obtained spectacular results in backtesting, but when operating in real account the results were very bad. This is mainly because they were made with conditions that had nothing to do with real market conditions.

For more information about it - read this summary.

--------------

As i know - some coders/traders are converting their MT4 EAs to MT5 just to backtest them and/or to find the settings with optimization to get the backtesting results that are closest to reality. 


Sergey Golubev
Moderator
99794
Sergey Golubev  

Tick Chart - indicator for MetaTrader 5 


The indicator displays the Ask and Bid, which are taken from the real tick history. Also, it is possible to evaluate the spread changes by visually comparing the Ask and Bid

Mark Ahrens
1201
Mark Ahrens  
VESTAXUS:

Program/Code Ind. Help - Every Tick Sound Change

Hello Forex-Tsd & Traders & especially coders,

Congrats on this Fanastic community, just joined, here to stay lol

Help With Creating/Coding a Sound Indicator - "Every Tick Sound"

I hope that this explains fully the project and please feel free to comment or send any recommendations. Thank you very much in advance!

Background: The idea is that i constantly can't monitor the charts with my 'eyes' but it could helpful to monitor the market using different sounds with my 'ears'.

Project:

1. To create a sound indicator for MT4

2. Six Audio short files

3. Every 1 tick UP triggers the first sound file "beep up 1"

4. Every 1 tick DOWN triggers sound file "beep down 1"

5. Every 5 ticks Jump UP triggers sound file "beep up 2"

6. Every 5 ticks Jump DOWN triggers sound file "beep down 2"

7. Every 7 ticks Jump UP triggers sound file "beep up 3"

8. Every 7 ticks Jump Down triggers sound file "beep down 3"

Here is a Diagram Explanation to explain further - Attachment or on this PhotoBucket Link

Result -an alternative way to track/monitor the market tick movement, volatility (tick jumps) with different sounds that identify market price 'sound' action. This could as well help the trader determine the speed of the market and Avoid trading when the market is 'dead' 1-3 pip range.

This project will be free to use for all users

Resources:

- Sound File 1&2 - Zip files with (wav./mp3) attached


Has this Indicator been created?

Thanks, Mark

Sergey Golubev
Moderator
99794
Sergey Golubev  

Generate Tick Data

The forum

  1. GenerateTickData indicator - the post. It is the indicator to generate tick data (so place it in indicators folder) and it will work the same regardless of the time frame it is attached to. It will create a file that is starting with "_t" and adds symbol name after it. It "pretends" to be 1 minute chart, but it is not (of course ). Just open that symbol as offline chart and use it (the indicator must be active on some other chart in order to get "live" ticks). 
  2. Tick Indicator and EAs - the key thread  
  3. What is a TICK? - small thread with the explanation
  4. GenerateTickData - final indicator is on this post. Two options added:
    - ResetData - Added it in order to be able to "start from the beginning" (if you turned off your PC and a "time gap" occurs since there is no way to reconstruct tick data or any other reason when you do not want the data to be appended to already existing tick data) If you set this parameter to true, it will start a new tick data history.
    - ShowComment - It is the fastest way to show that it is working, so if you set it to true it will simply comment in the upper left corner that tick data is saved and a time when it was saved.
  5. Tick Data v1.00 indicator - the post. It is next version of GenerateTickData indicator: Added an option to choose how many ticks do you want per bar. Indicator is differentiating 2 basic types:
    - When required number of ticks per bar is 1, it records bid as low and ask as high, so you can have a sort of a "spread control" (since now you can see those ticks as lines but you can see them as bars too, as in this example );
    - When required number of ticks is greater than 1 then you are getting a sort of "equi-volume" charts (every bar is having a same volume when you turn the volume display on) High, low, open and close are constructed from a Bid.
  6. Tick Data v1.01 indicator - the post. This is improved version of Tick Data v1.00 indicator. This indicator can produce an offline chart of ticks simulated by metatrader and if you are testing an EA that depends on a narrow take profits or stops, this indicator shows you that back test can not be trusted at all. The indicator is, apart from having the possibility of recording test data, a revised version with some code optimization and some corrections.
  7. Tick Data v1.02 indicator - the post. It is the Newer version of tick data indicator. Unlike before (previous versions) this one make difference as of how many ticks is chosen and saves it accordingly. As before the name of the symbol for offline charts is "_t"+symbol name, but the difference is in the "time frame" it is saved as : the time frame is in fact number of ticks. So you are going to artificially get a 1 minute, 10 minute, nnn minutes tick charts where minutes are in fact number of ticks per bar. The limitation (due to metatrader naming conventions) is that the maximum number of ticks can be 9999. All the charts are updated live (one 1 tick chart and two 10 tick charts) and both indicators (for 1 tick and 10 tick) are attached to the same chart.
  8. Tick Data v1.03 indicator - the post. It is the next version of Tick Data indicator. A parameter to add a completely new option - there is some explanation of the author: "It occurred to me that a tick chart is a bit "illogical" - illogical in a sense that current bar open is very rarely previous bar open (since it was opened at first tick after a current bar reaches tick count), not when the previous bar was closed. So decided to add on option that takes care of it : UsePreviousCloseForOpen - if set to true, then the open is determined from previous bar close not the first ticks after the bar opens, if set to false it work as before".

The articles

CodeBase

To add comments, please log in or register