Skip to content

Commit

Permalink
Merge pull request #1 from EA31337/dev
Browse files Browse the repository at this point in the history
Implements initial strategy logic
  • Loading branch information
kenorb authored Sep 10, 2023
2 parents 93be2d9 + ba1b054 commit e1d80e3
Show file tree
Hide file tree
Showing 8 changed files with 461 additions and 313 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ jobs:
include: .
init-platform: true
mt-version: 5.0.0.2361
path: Stg_MA_Cross_Sup_Res.mq4
path: Stg_Retracement.mq4
verbose: true
- name: Compile for MQL5
uses: fx31337/mql-compile-action@master
with:
include: .
mt-version: 5.0.0.2515
path: Stg_MA_Cross_Sup_Res.mq5
path: Stg_Retracement.mq5
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
OptFormatBrief: true
OptFormatJson: true
OptVerbose: true
TestExpert: "Stg_MA_Cross_Sup_Res"
TestExpert: "Stg_Retracement"
TestPeriod: M1
TestReportName: Report-${{ matrix.year }}-${{ matrix.month }}
- name: Upload results
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
include: .
init-platform: true
mt-version: 5.0.0.2361
path: Stg_MA_Cross_Sup_Res.mq4
path: Stg_Retracement.mq4
verbose: true
- name: Compile for MQL5
uses: fx31337/mql-compile-action@master
with:
include: .
mt-version: 5.0.0.2515
path: Stg_MA_Cross_Sup_Res.mq5
path: Stg_Retracement.mq5
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Strategy MA Cross Sup/Res
# Strategy Retracement

[![Status][gha-image-check-master]][gha-link-check-master]
[![Status][gha-image-compile-master]][gha-link-compile-master]
Expand All @@ -7,8 +7,7 @@
[![License][license-image]][license-link]
[![Edit][gh-edit-badge]][gh-edit-link]

Strategy based on the moving average price indicators
implementing support/resistance cross signal.
Strategy based on the Fibonacci retracement levels.

## Dependencies

Expand All @@ -22,12 +21,12 @@ implementing support/resistance cross signal.
[gh-discuss-link]: https://github.com/EA31337/EA31337-Strategies/discussions

[gh-edit-badge]: https://img.shields.io/badge/GitHub-edit-purple.svg?logo=github
[gh-edit-link]: https://github.dev/EA31337/Strategy-MA_Cross_Sup_Res
[gh-edit-link]: https://github.dev/EA31337/Strategy-Retracement

[gha-link-check-master]: https://github.com/EA31337/Strategy-MA_Cross_Sup_Res/actions?query=workflow:Check+branch%3Amaster
[gha-image-check-master]: https://github.com/EA31337/Strategy-MA_Cross_Sup_Res/workflows/Check/badge.svg?branch=master
[gha-link-compile-master]: https://github.com/EA31337/Strategy-MA_Cross_Sup_Res/actions?query=workflow:Compile+branch%3Amaster
[gha-image-compile-master]: https://github.com/EA31337/Strategy-MA_Cross_Sup_Res/workflows/Compile/badge.svg?branch=master
[gha-link-check-master]: https://github.com/EA31337/Strategy-Retracement/actions?query=workflow:Check+branch%3Amaster
[gha-image-check-master]: https://github.com/EA31337/Strategy-Retracement/workflows/Check/badge.svg?branch=master
[gha-link-compile-master]: https://github.com/EA31337/Strategy-Retracement/actions?query=workflow:Compile+branch%3Amaster
[gha-image-compile-master]: https://github.com/EA31337/Strategy-Retracement/workflows/Compile/badge.svg?branch=master

[tg-channel-image]: https://img.shields.io/badge/Telegram-join-0088CC.svg?logo=telegram
[tg-channel-link]: https://t.me/EA31337
Expand Down
287 changes: 0 additions & 287 deletions Stg_MA_Cross_Sup_Res.mqh

This file was deleted.

4 changes: 2 additions & 2 deletions Stg_MA_Cross_Sup_Res.mq4 → Stg_Retracement.mq4
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

/**
* @file
* Implements MA Cross Sup/Res strategy.
* Implements Retracement strategy.
*/

// Includes the main code.
#include "Stg_MA_Cross_Sup_Res.mq5"
#include "Stg_Retracement.mq5"
14 changes: 7 additions & 7 deletions Stg_MA_Cross_Sup_Res.mq5 → Stg_Retracement.mq5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file
* Implements MA Cross Sup/Res strategy.
* Implements Retracement strategy.
*/

// Includes conditional compilation directives.
Expand All @@ -20,20 +20,20 @@
#include <EA31337-classes/Strategy.mqh>

// Inputs.
INPUT_GROUP("MA Cross Sup/Res strategy: main");
INPUT_GROUP("Retracement strategy: main");
input int Active_Tfs = M15B + M30B + H1B + H2B + H3B + H4B + H6B +
H8B; // Timeframes (M1=1,M2=2,M5=16,M15=256,M30=1024,H1=2048,H2=4096,H3,H4,H6,H8)
input ENUM_LOG_LEVEL Log_Level = V_INFO; // Log level.
input bool Info_On_Chart = true; // Display info on chart.

// Includes strategy.
#include "Stg_MA_Cross_Sup_Res.mqh"
#include "Stg_Retracement.mqh"

// Defines.
#define ea_name "Strategy MA Cross Sup/Res"
#define ea_name "Strategy Retracement"
#define ea_version "2.000"
#define ea_desc "Strategy based on the moving average price indicators implementing support/resistance cross signal."
#define ea_link "https://github.com/EA31337/Strategy-MA_Cross_Sup_Res"
#define ea_desc "Strategy based on the Fibonacci retracement levels."
#define ea_link "https://github.com/EA31337/Strategy-Retracement"
#define ea_author "EA31337 Ltd"

// Properties.
Expand All @@ -59,7 +59,7 @@ int OnInit() {
bool _result = true;
EAParams ea_params(__FILE__, Log_Level);
ea = new EA(ea_params);
_result &= ea.StrategyAdd<Stg_MA_Cross_Sup_Res>(Active_Tfs);
_result &= ea.StrategyAdd<Stg_Retracement>(Active_Tfs);
return (_result ? INIT_SUCCEEDED : INIT_FAILED);
}

Expand Down
Loading

0 comments on commit e1d80e3

Please sign in to comment.