Skip to content

Commit b76d490

Browse files
authored
Initialize v2.000-dev
0 parents  commit b76d490

15 files changed

Lines changed: 578 additions & 0 deletions

.clang-format

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
ColumnLimit: 120
5+
IndentPPDirectives: BeforeHash

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ubuntu/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
4+
ARG VARIANT="jammy"
5+
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
5+
// "build": {
6+
// "dockerfile": "Dockerfile",
7+
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
8+
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
9+
// "args": { "VARIANT": "ubuntu-22.04" }
10+
// },
11+
12+
// Configure tool-specific properties.
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"DavidAnson.vscode-markdownlint",
17+
"EA31337.vscode-mql-tools",
18+
"ms-vscode.cpptools",
19+
"ms-vscode.cpptools-extension-pack",
20+
"nicholishen.mql-over-cpp",
21+
"vscodevim.vim",
22+
"xaver.clang-format",
23+
"GitHub.copilot",
24+
"GitHub.copilot-chat"
25+
]
26+
}
27+
},
28+
// Features to add to the dev container. More info: https://containers.dev/features.
29+
"features": {
30+
"ghcr.io/devcontainers-contrib/features/actionlint:1": {},
31+
"ghcr.io/devcontainers-contrib/features/node-asdf:0": {},
32+
"ghcr.io/devcontainers-extra/features/pipx-package:1": {},
33+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
34+
"ghcr.io/devcontainers/features/python:1": {},
35+
"ghcr.io/guiyomh/features/vim:0": {},
36+
"ghcr.io/jungaretti/features/make:1": {},
37+
"ghcr.io/prulloac/devcontainer-features/pre-commit:1": {},
38+
"ghcr.io/jungaretti/features/ripgrep:1": {}
39+
// "ghcr.io/maks1ms/devcontainers-features/wine:0": {}
40+
},
41+
42+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
43+
// "forwardPorts": [],
44+
45+
// Use 'postCreateCommand' to run commands after the container is created.
46+
// "postCreateCommand": "uname -a",
47+
48+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
49+
"image": "mcr.microsoft.com/devcontainers/base:jammy",
50+
51+
"postCreateCommand": "pip install -r .devcontainer/requirements.txt",
52+
53+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
54+
"remoteUser": "vscode",
55+
"onCreateCommand": "sudo apt update && sudo apt install -y pipx && pipx install --include-deps ansible"
56+
}

.devcontainer/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ansible
2+
ansible-lint
3+
pre-commit

.gitattributes

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# git normalization file
2+
# @see http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Shorthand for text files.
5+
# - Treat them as text.
6+
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
7+
# - Detect whitespace errors.
8+
# - Exposed by default in `git diff --color` on the CLI.
9+
# - Validate with `git diff --check`.
10+
# - Deny applying with `git apply --whitespace=error-all`.
11+
# - Fix automatically with `git apply --whitespace=fix`.
12+
[attr]utf8 text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
13+
[attr]utf16 encoding=UTF-16LE-BOM working-tree-encoding=UTF-16LE-BOM diff merge eol=CRLF
14+
15+
# Shorthand for binary files.
16+
# - Do not treat them as text.
17+
# - Include binary diff in patches instead of "binary files differ."
18+
[attr]binary -text diff
19+
20+
# Define text file attributes.
21+
*.ex? binary
22+
*.h utf8 diff=c
23+
*.json utf8 diff=c
24+
*.mq? utf8 diff=c
25+
*.mqproj utf16 diff=c
26+
*.txt utf8 diff=c

.github/workflows/check.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Check
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
pull_request:
7+
push:
8+
9+
jobs:
10+
Pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/cache@v3
15+
with:
16+
path: ~/.cache/pre-commit
17+
key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}
18+
- uses: actions/setup-python@v3
19+
with:
20+
python-version: 3.9
21+
- uses: pre-commit/action@v3.0.0

.github/workflows/compile.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
name: Compile
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
pull_request:
7+
branches:
8+
- 'master'
9+
- '*dev*'
10+
paths-ignore:
11+
- '*.md'
12+
- '.git*'
13+
push:
14+
branches:
15+
- 'master'
16+
- '*dev*'
17+
paths-ignore:
18+
- '*.md'
19+
- '.git*'
20+
workflow_call:
21+
22+
jobs:
23+
checkout-classes:
24+
name: Checkout Classes repo
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
ref: v3.000.2
30+
repository: EA31337/EA31337-classes
31+
- name: Uploads source code
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: src-classes
35+
path: .
36+
37+
mt4:
38+
name: Installs platform (4)
39+
uses: EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
40+
with:
41+
artifact_name: .mt4
42+
artifact_overwrite: true
43+
skip_cleanup: true
44+
version: 4
45+
46+
mt5:
47+
name: Installs platform (5)
48+
uses: EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
49+
with:
50+
artifact_name: .mt5
51+
artifact_overwrite: true
52+
skip_cleanup: true
53+
version: 5
54+
55+
compile:
56+
defaults:
57+
run:
58+
shell: powershell
59+
name: Compile
60+
needs: [checkout-classes, mt4, mt5]
61+
runs-on: windows-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
with:
65+
submodules: recursive
66+
- uses: actions/download-artifact@v4
67+
with:
68+
name: src-classes
69+
path: Include/EA31337-classes
70+
- uses: actions/download-artifact@v4
71+
with:
72+
pattern: .mt?
73+
- name: Enables input mode
74+
run: echo '#define __input__' > config/define.h
75+
- name: Compile
76+
uses: fx31337/mql-compile-action@master
77+
with:
78+
include: .
79+
mt-path: .mt${{ matrix.version }}
80+
path: "**/Stg_*.mq${{ matrix.version }}"
81+
verbose: true
82+
- name: List compiled files
83+
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
84+
- run: Get-Location
85+
- name: Upload artifacts
86+
uses: actions/upload-artifact@v4
87+
with:
88+
if-no-files-found: error
89+
name: Strategy-ex${{ matrix.version }}
90+
path: '**/Stg_*.ex${{ matrix.version }}'
91+
strategy:
92+
matrix:
93+
version:
94+
- 4
95+
- 5
96+
max-parallel: 2
97+
timeout-minutes: 10
98+
99+
cleanup:
100+
if: inputs.skip_cleanup != true
101+
name: Clean-up
102+
needs: [compile]
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: geekyeggo/delete-artifact@v5
106+
with:
107+
name: .mt?

.github/workflows/test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Test
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
pull_request:
7+
branches:
8+
- 'master'
9+
- '*dev*'
10+
paths-ignore:
11+
- '*.md'
12+
push:
13+
branches:
14+
- 'master'
15+
- '*dev*'
16+
paths-ignore:
17+
- '*.md'
18+
19+
jobs:
20+
21+
compile:
22+
name: Compile
23+
uses: ./.github/workflows/compile.yml
24+
25+
test:
26+
name: Test
27+
needs: compile
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
file:
32+
- Stg_Demo
33+
year: [2022, 2024]
34+
version: [5]
35+
steps:
36+
- uses: actions/download-artifact@v4
37+
with:
38+
merge-multiple: true
39+
pattern: Strategy-ex${{ matrix.version }}
40+
41+
- name: List compiled files
42+
run: find . -name '*.ex?' -type f -print
43+
44+
- name: Test ${{ matrix.year }}
45+
uses: fx31337/mql-tester-action@master
46+
with:
47+
Login: ${{ secrets.MT5_LOGIN }}
48+
Password: ${{ secrets.MT5_PASSWORD }}
49+
Server: MetaQuotes-Demo
50+
TestDeposit: 2000
51+
TestExpert: ${{ matrix.file }}.ex5
52+
TestFromDate: ${{ matrix.year }}.01.01
53+
TestPeriod: M1
54+
TestSymbol: EURUSD
55+
TestToDate: ${{ matrix.year }}.01.14
56+
# yamllint disable-line rule:line-length
57+
UrlExpert: file://${{ github.workspace }}/${{ matrix.file }}.ex5
58+
Version: 5

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Ignores compiled binary files.
2+
*.ex?
3+
4+
# Ignores temporary files.
5+
*.swp
6+
*~
7+
8+
# Ignores Finder metadata files on Mac
9+
.DS_Store
10+
11+
# Ignores Python cache files.
12+
*.pyc
13+
__pycache__

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
repos:
3+
4+
- repo: https://github.com/adrienverge/yamllint.git
5+
rev: v1.32.0
6+
hooks:
7+
- id: yamllint
8+
9+
- repo: https://github.com/igorshubovych/markdownlint-cli.git
10+
rev: v0.35.0
11+
hooks:
12+
- id: markdownlint
13+
14+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
15+
rev: 3.0.0
16+
hooks:
17+
- id: forbid-binary
18+
exclude: (\.ico|\.mqproj)$
19+
- id: git-check # Configure in .gitattributes
20+
# - id: markdownlint # Configure in .mdlrc.style.rb
21+
- id: require-ascii
22+
23+
- repo: https://github.com/pre-commit/pre-commit-hooks
24+
rev: v4.4.0
25+
hooks:
26+
- id: check-added-large-files
27+
- id: check-byte-order-marker
28+
- id: check-case-conflict
29+
- id: check-executables-have-shebangs
30+
- id: check-merge-conflict
31+
- id: check-yaml
32+
- id: end-of-file-fixer
33+
- id: trailing-whitespace
34+
35+
- repo: https://github.com/thibaudcolas/curlylint
36+
rev: v0.13.1
37+
hooks:
38+
- id: curlylint

0 commit comments

Comments
 (0)