CryptoCurrency MT4 history maker MTF
- Utilitys
- Farzin Sadeghi Bonjar
- Version: 924.21
- Aktualisiert: 23 Februar 2024
- Aktivierungen: 5
This is a program in the form of an EA that attaches to a chart in MetaTrader 4. Then, by using API from Bittrex, Binance websites, it downloads the history of altcoins.
By selecting a pair name, the EA automatically downloads all time frames history (Daily,H12,H4,H2,H1,M30,M15,M5,M3,M1) so there is no need to attach multiple EAs to different charts.
You can select one pair from Bittrex and 4 pairs from Binance exchange with one running EA and create up to 15 timeframes for 5 different pairs.
The EA also searches for opened offline charts and refreshes those charts with latest data automatically.
When I started working in CryptoCurrency market I saw that the charting platform of Bittrex website was really annoying. For example, when you draw some lines or Fibo on charts and refresh the tab in your browser all those lines will be removed.
So I started writing this EA to have Crypto Currency charts in MetaTrader and also being able to use my other written indicators to optimize my trading/analyzing the markets.
Because the history format of exchanges are not compatible with the MetaTrader history format, there are multiple steps of conversion in the EA code to generate a usable history version 401 for MetaTrader4.
Hope it will be a helpful tool for you too.
How to use
When you attach the EA to a chart, there is a list of altcoins in the EA. Select your needed pair (for example BTCIOP) then select the time frames you need the EA to generate charts for (by default all time frames are active).
Then select the time interval at which you want the history/charts to be refreshed (by default the timer is set to 10 seconds interval).
You should add the link 'https://bittrex.com/Api' and 'https://api.binance.com/api' to tools --> options --> expert advisors --> allow web request for listed URL.
On each request, the size of the history that gets downloaded for all timeframes of each pair is near 1MB.
So in 24 hours for each pair on it will be around 1.5 GB/day or 43 GB/month. So I suggest using this EA on a non-metered network, or run it on your VPS or reduce the download time interval.
After that the EA downloads the history files for the first time, It will process them, and create the history files. For the next calls it will just download the last candle history and update the most recent candle to reduce bandwidth usage and also having a correct candle index number for indicators.
Then you should go to files --> Open Offline --> find your pair name and timeframe (for example BtcBLITZ-Btr H1 for bittrex or BTCUSDT-Bin M3 for binance) and open the related offline chart.
EA settings
- Download Bittrex history: enable/disable downloading charts from Bittrex.
- Pair_Name_Bittrex: the currency you want to have its chart like "BTCIOP" from Bittrex.
- Download Binance USDT/BTC/BNB/ETH history: enable/disable downloading charts from Binance.
- Pair name USDT_Binance: select the USDT pair from Binance.
- Pair name BTC_Binance: select the BTC pair from Binance.
- Pair name BNB_Binance: select the BNB pair from Binance.
- Pair name ETH_Binance: select the ETH pair from Binance.
- Download interval: the timer setting for getting the history of the chart. Default: 10 seconds. Increase it if you want less network traffic to be used.
- Decimal places: leave it to 8 decimal points for those markets.
- Get_M1 ... to Monthly_Data: disable it if you don't need to have that time frame chart.
- Auto navigate to chart end: enable it if you want the loaded chart to move to the last candles.
- Print_Logs: Prints some of the generated history value in the logs section of MetaTrader to check if its working fine or not (disabled by default - for troubleshooting only).
Note 1: This EA is for generating offline charts and having cryptocurrency charts in MetaTrader so that you can use your indicators with those markets too.
Using experts for trading on this charts may not have the optimal results, so I may not be responsible for any other use of such charts.
Note 2: This EA will work as long as Bittrex/Binance website provide their API access for free. In case of changes in that website, I may find another API or history links to use in this EA. So there may be a downtime at some point in future till I upgrade the code.
Note 3: Webrequest function does not work in backtesting.
Note 4: There is no need to enable DLL option.