Skip to content

Commit 585fd96

Browse files
committed
Moved DLLs to /libs
* fixed default path in pythonnet imports * moved DLLs to own ./libs directory * added PR template (WIP) * Updated README
1 parent f4cfc75 commit 585fd96

File tree

7 files changed

+71
-23
lines changed

7 files changed

+71
-23
lines changed

.github/pull_request_template.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
#### Description
4+
<!--- Describe your changes in detail -->
5+
6+
#### Related Issue
7+
<!--- This project only accepts pull requests related to open issues -->
8+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
9+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
10+
<!--- Please link to the issue here: -->
11+
12+
#### Motivation and Context
13+
<!--- Why is this change required? What problem does it solve? -->
14+
15+
#### Requires Documentation Change
16+
<!--- Please indicate if these changes will require updates to documentation, and if so, specify what changes are required -->
17+
18+
#### How Has This Been Tested?
19+
<!--- Please describe in detail how you tested your changes. -->
20+
<!--- Include details of your testing environment, and the tests you ran to -->
21+
<!--- see how your change affects other areas of the code, etc. -->
22+
23+
#### Types of changes
24+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
25+
- [ ] Bug fix (non-breaking change which fixes an issue)
26+
- [ ] Refactor (non-breaking change which improves implementation)
27+
- [ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
28+
- [ ] New feature (non-breaking change which adds functionality)
29+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
30+
- [ ] Non-functional change (xml comments/documentation/etc)
31+
32+
#### Checklist:
33+
<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->
34+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
35+
- [ ] My code follows the code style of this project.
36+
- [ ] I have read the **CONTRIBUTING** [document](https://github.com/eabase/mt4pycon/blob/master/CONTRIBUTING.md).
37+
<!--- - [ ] I have added tests to cover my changes.-->
38+
<!--- If not applicable, please explain why -->
39+
<!--- - [ ] All new and existing tests passed. -->
40+
- [ ] My branch follows the naming convention `bug-<issue#>-<description>` or `feature-<issue#>-<description>`

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
/junk/
1717

1818
# MtAtpi DLL's
19-
*.dll
19+
#*.dll
20+
#/**/*.dll
2021

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414

1515
The **`mt4pycon`** repo is a collection of Python3 code used to interface with MT4 and MT5
16-
terminals via 3rd party API's. As of today there is only one script available, but will
16+
terminals via 3rd party API's. As of today there is only 2 scripts available, but will
1717
soon contain several other examples for simple indicators, data scrapers/analyzers to
1818
AI/ML automated trading bots.
1919

2020

2121
---
2222

23-
**`con2mtapi`**
23+
**`con2mtapi.py`**
2424

2525
This is a simple *Python3* CLI client that is using the MT4 bridge API
2626
([mtapi](https://github.com/vdemydiuk/mtapi/)) to connect to a MT4 Terminal which
@@ -30,6 +30,12 @@ for a specified symbol and timeframe. This particular script is using the MQL bu
3030
`CopyRates` and `iBars()` functions for receiving the candle data.
3131

3232

33+
**`liveTicks.py`**
34+
35+
A very rudimentary data feed that is continusly *polling* the MQL `SymbolInfoTick(sym)`
36+
funtion, to display *Time, Bid, Ask* and *Spread* (in points), for a given symbol.
37+
This should probably be rewritten using a threaded listener...
38+
3339
Example Output:
3440

3541
<sub>Using symbolic TF and normal tabulated output.</sub>
@@ -38,6 +44,9 @@ Example Output:
3844
<sub>Using numerical TF and CSV output.</sub>
3945
![Full](./docs/image2.png)
4046

47+
<sub>Live Tick stream with Spread...</sub>
48+
![Full](./docs/image3.png)
49+
4150
---
4251

4352
**Q:** *What is **`mtapi`** and what does it do?*
@@ -107,6 +116,7 @@ As always, any small crypto donation is an inspitring incentive to make things h
107116
Python packages:
108117

109118
* [pythonnet](https://github.com/pythonnet/pythonnet) - `Python.NET` for the .NET *Common Language Runtime* (CLR)
119+
* [pyreadline](https://github.com/pyreadline/pyreadline) - [Not Required] *"You don't wanna develop without it!"*
110120

111121
and what you already have:
112122
* [MT4](https://github.com/rosasurfer/mt4-mql) - Latest (unbranded) MT4 and MetaEditor4 downloads
@@ -239,16 +249,16 @@ If you want to compile your own MtApi libraries, please check the original
239249
*mtapi* github repo for detailed compilation instructions.
240250

241251
In summary, for modifying the EA, you would need to:
242-
(a) Copy the `MtApi.mq4` file into the `../MQL4/Experts/` folder
243-
(b) copy the following MQL Library files into the `../MQL4/Include/` folder:
252+
**(a)** Copy the `MtApi.mq4` file into the `../MQL4/Experts/` folder.
253+
**(b)** Copy the following MQL Library files into the `../MQL4/Include/` folder:
244254

245255
```bash
246256
hash.mqh
247257
json.mqh
248258
mql4-auth.mqh
249259
```
250260

251-
(c) Recompile `MtAPi.mq4` in *MetaEditor4*.
261+
**(c)** Recompile `MtApi.mq4` in *MetaEditor4*.
252262

253263

254264
---
@@ -351,15 +361,17 @@ C:\Users\<username>\AppData\Roaming\MetaQuotes\Terminal\<unique-hash>\MQL4\Exper
351361

352362
#### Recommeded Similar Tools:
353363

354-
`TBA`
364+
* [dwx-zeromq-connector](https://github.com/darwinex/dwx-zeromq-connector) (*ZeroMQ-enabled MetaTrader Bridge EA*)
365+
* [mql4-lib](https://github.com/dingmaotu/mql4-lib) (*MQL4/5 Foundation Library*)
366+
* [mql-zmq](https://github.com/dingmaotu/mql-zmq) (*ZMQ binding for the MQL*)
355367

356368

357369
#### Known Bugs and Warnings
358370

359-
* When running the script for the *first* time on a certain symbol and timeframe, the
371+
:negative_squared_cross_mark: When running the script for the *first* time on a certain symbol and timeframe, the
360372
candle data will not be available in the MT4 terminal buffer, so the script will fail.
361-
Just run it again and MT4 will most likely have already downloaded the new data. I have
362-
not been able to resolve this issue.
373+
Just run it again and MT4 will most likely have already downloaded the new data. A bug report
374+
has been filed in this [issue](#4).
363375

364376

365377
#### ToDo / Help Needed
@@ -372,24 +384,14 @@ Feel free to post issues and PR's related to this tool.
372384
Feel free to fork, break, fix and contribute. Enjoy!
373385

374386

375-
#### Donation
387+
#### Donations
376388

377389
Almost everything I do is Free and Open Source Software (FOSS).
378390
This means that I do not receive any income on any of my projects.
379391
So if you find any of my projects or code, cool & useful, please
380392
consider making a small donation to any of my crypto accounts.
381393

382-
<details><summary>Adresses</summary>
383-
384-
| Symbol | Name | Address |
385-
|:--------:|:--------:|:--------|
386-
| BTC | Bitcoin | `bc1qkcyxnerc2sa8xn8d30wkgfqy64jhcxxzf0xv05` |
387-
| ZEC | Zcash | `t1aDszWfkHcSR5yjYrpjYLxj44Lfw7g9GDn` |
388-
| XMR | Monero | `43ACVrQMQ23bh99S7ohJ4cbDA7mVXwUcYRNjyVkr4t3bgqikfpvQu9i4aBeu7vmzCKJek3pkidEFMYEZ6fJpb6Y6HgPAC5m` |
389-
| ETH | Ethereum | `0x53266f143193e08B91bF943a694f8F9D9435163B` |
390-
| LTC | Litecoin | `LW7Eu5omvBPRA1sXrKDtemVBrMYzFdwRAF` |
391-
392-
</details>
394+
See my [profile](https://github.com/eabase) page for Crypto Adresses.
393395

394396

395397
#### Additional Badges

con2mtapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@
106106
# For MT4 installs
107107
#--------------------------------------
108108
# C:\Program Files (x86)\MtApi
109-
sys.path.append(r"C:\Program Files\MtApi")
109+
#sys.path.append(r"C:\Program Files\MtApi")
110+
#sys.path.append(r"C:\Program Files (x86)\MtApi")
111+
sys.path.append(r".\libs")
110112
asm = clr.AddReference('MtApi')
111113
import MtApi as mt
112114

libs/MtApi.dll

95 KB
Binary file not shown.

libs/Newtonsoft.Json.dll

511 KB
Binary file not shown.

libs/README.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This folder contain the latest built DLL's from the mtapi releases.
2+
For usage, please consult that repo.
3+

0 commit comments

Comments
 (0)