Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New V2 release (code refactor) #45

Merged
merged 32 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6078ecc
Updates classes ref to v3.000.1
kenorb May 22, 2023
093878e
Updates classes to v3.000-dev
kenorb May 28, 2023
e868908
Refactors EA code to v2
kenorb May 28, 2023
3e03a20
Fixes Python setup (refs: actions/setup-python/issues/555)
kenorb Dec 7, 2022
8823f7d
Changes active timeframes for better results
kenorb Dec 14, 2022
c8d46c3
Sets H1B and H4B timeframes by default
kenorb May 17, 2023
faa6c35
GHA: Updates Check workflow
kenorb May 28, 2023
f939be7
Adds meta strategies
kenorb May 29, 2023
b837968
Adds new strategies
kenorb Sep 10, 2023
d6af9c0
Sets Oscillator Cross Shift as default
kenorb Sep 10, 2023
5b9bb19
Sets MA as default strategy
kenorb Sep 10, 2023
810cb75
GHA: Refactors Compile workflow
kenorb Feb 17, 2024
e17127a
Merges two compile workflows into one
kenorb Feb 18, 2024
8f692a8
Revert "Merges two compile workflows into one"
kenorb Feb 18, 2024
a72be12
Uploads source code to artifact
kenorb Feb 18, 2024
c15208d
GHA: Refactors test workflows
kenorb Feb 18, 2024
d881077
Sets merge-multiple to download artifacts into the current directory
kenorb Feb 21, 2024
5821c01
Adds github.workspace to UrlExpert
kenorb Feb 21, 2024
70c7e88
Adds creds for demo account
kenorb Feb 22, 2024
d10e55e
Improves Backtest workflow
kenorb Feb 22, 2024
bb8ab7b
Updates checkout actions
kenorb Feb 22, 2024
eaf19aa
Moves redundant workflows to old/
kenorb Feb 22, 2024
dfc5799
Updates classes to v3.000.2
kenorb May 5, 2024
4bdd880
Updates strategies to dev
kenorb May 5, 2024
21e407c
GHA: Improves Compile workflow
kenorb May 5, 2024
8b14e7e
GHA: Test: Sets TestModel to 1
kenorb May 5, 2024
32d5a1f
GHA: Test: Runs mxschmitt/action-tmate on failure
kenorb May 5, 2024
1120a86
Merge tag 'v1.013' into dev-v3000
kenorb Jul 7, 2024
af75bba
Comments out Account.h
kenorb Jul 7, 2024
ff594ea
Removes redundant includes
kenorb Jul 7, 2024
f16bc2e
Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows
dependabot[bot] Sep 3, 2024
7c6aa2f
Merge remote-tracking branch 'origin/dependabot/github_actions/dot-gi…
kenorb Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 24 additions & 45 deletions .github/workflows/backtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,49 @@ on:
push:
branches:
- 'v*-backtest'
paths:
- .github/workflows/backtest.yml
release:
types:
- published

jobs:

Compile:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: List MQL files
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
shell: powershell
- name: Compiles EA (MQL4)
uses: fx31337/mql-compile-action@master
with:
path: src\EA31337-Libre.mq4
verbose: true

- name: Compiles EA (MQL5)
uses: fx31337/mql-compile-action@master
with:
path: src\EA31337-Libre.mq5
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: EA
path: 'src/*.ex?'
compile:
name: Compile
uses: ./.github/workflows/compile.yml

Backtest:
backtest:

defaults:
run:
shell: bash

needs: Compile
name: Backtest
needs: compile
runs-on: ubuntu-latest

strategy:
matrix:
deposit: [10000, 100000]
spread: [1, 10]
year: [2020]

steps:

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: EA

- name: Test ${{ matrix.year }}.${{ matrix.month }}
uses: fx31337/mql-tester-action@master
uses: fx31337/mql-tester-action@dev
with:
BtDeposit: ${{ matrix.deposit }}
BtDigits: 5
BtMonths: 1-12
BtSpread: ${{ matrix.spread }}
BtYears: ${{ matrix.year }}
RunOnError: 'show_logs && parse_results $@; exit 0'
TestExpert: EA31337-Libre
Login: ${{ secrets.MT5_LOGIN }}
Password: ${{ secrets.MT5_PASSWORD }}
Server: MetaQuotes-Demo
TestDeposit: ${{ matrix.deposit }}
TestExpert: EA31337-Libre.ex5
TestFromDate: ${{ matrix.year }}.01.01
TestPeriod: M1
TestSymbol: EURUSD
TestToDate: ${{ matrix.year }}.12.31
UrlExpert: file://${{ github.workspace }}/EA31337-Libre.ex5

strategy:
matrix:
deposit: [10000, 100000]
year: [2022, 2023]
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
Pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down
112 changes: 91 additions & 21 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,116 @@
---
name: Compile

env:
ARTIFACT_PREFIX: ${{ inputs.artifact_prefix || 'mt' }}
REPOSITORY: EA31337/EA31337-Libre
SKIP_CLEANUP: ${{ inputs.skip_cleanup || false }}

# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- 'master'
- '*dev*'
paths-ignore:
- '**.md'
- '*.md'
- '.git*'
push:
branches:
- 'master'
- '*dev*'
paths-ignore:
- '**.md'
- '*.md'
- '.git*'
workflow_call:
inputs:
artifact_prefix:
default: mt
description: Artifact prefix.
required: false
type: string
skip_cleanup:
default: false
description: Whether to skip a clean-up job.
required: false
type: boolean

jobs:
Compile:
checkout:
name: Checkout
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Uploads source code
uses: actions/upload-artifact@v4
with:
name: src
path: src
mt4:
name: Installs platform (4)
uses: EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
with:
artifact_name: ${{ inputs.artifact_prefix || 'mt' }}4
artifact_overwrite: true
skip_cleanup: true
version: 4

mt5:
name: Installs platform (5)
uses: EA31337/EA-Tester/.github/workflows/platform-linux.yml@dev
with:
artifact_name: ${{ inputs.artifact_prefix || 'mt' }}5
artifact_overwrite: true
skip_cleanup: true
version: 5

compile-ea:
defaults:
run:
shell: powershell
working-directory: src
name: Compile EA
needs: [checkout, mt4, mt5]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4
with:
submodules: recursive
- name: List MQL files
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
shell: powershell
- name: Compiles EA (MQL4)
uses: fx31337/mql-compile-action@master
name: src
path: src
- uses: actions/download-artifact@v4
with:
path: src\EA31337-Libre.mq4
verbose: true

- name: Compiles EA (MQL5)
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
- name: List all source code files
run: '(Get-ChildItem -Recurse -Path . -Include *.mq[45]).fullname'
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
- name: Compiles EA
uses: fx31337/mql-compile-action@master
with:
path: src\EA31337-Libre.mq5
mt-path: .${{ env.ARTIFACT_PREFIX }}${{ matrix.version }}
path: src\EA31337-Libre.mq${{ matrix.version }}
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'

- run: Get-Location
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: EA-Libre.ex${{ matrix.version }}
path: src/*.ex?
strategy:
matrix:
version: [4, 5]
timeout-minutes: 30

cleanup:
if: inputs.skip_cleanup != true
name: Clean-up
needs: [compile-ea]
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: EA
path: 'src/*.ex?'
name: ${{ env.ARTIFACT_PREFIX }}*
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
working-directory: src
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: recursive
- name: List MQL files
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
sets-list: ${{ steps.get-sets.outputs.sets }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set output with list of sets
id: get-sets
run: |
Expand All @@ -73,7 +73,7 @@ jobs:
matrix:
setfile: ${{ fromJson(needs.Process.outputs.sets-list) }}
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
path: .
- name: Display SET file
Expand Down Expand Up @@ -116,12 +116,12 @@ jobs:
needs: Optimize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
# Otherwise, you will failed to push refs to dest repo.
fetch-depth: 0
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: results
path: .results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
working-directory: src
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: recursive
- name: List MQL files
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
sets-list: ${{ steps.get-sets.outputs.sets }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set output with list of sets
id: get-sets
run: |
Expand All @@ -73,7 +73,7 @@ jobs:
matrix:
setfile: ${{ fromJson(needs.Process.outputs.sets-list) }}
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
path: .
- name: Display SET file
Expand Down Expand Up @@ -116,12 +116,12 @@ jobs:
needs: Optimize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false
# Otherwise, you will failed to push refs to dest repo.
fetch-depth: 0
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: results
path: .results
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
if: github.repository != 'EA31337/EA31337-Libre'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: upstream
Expand Down
Loading
Loading