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 trading logic
  • Loading branch information
kenorb authored Sep 2, 2023
2 parents 42092cd + d540f86 commit f01bf6d
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 257 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backtest.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_Oscillator_Cross.mq4
path: Stg_Oscillator_Cross_Zero.mq4
verbose: true
- name: Compile for MQL5
uses: fx31337/mql-compile-action@master
with:
include: .
mt-version: 5.0.0.2515
path: Stg_Oscillator_Cross.mq5
path: Stg_Oscillator_Cross_Zero.mq5
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
OptFormatBrief: true
OptFormatJson: true
OptVerbose: true
TestExpert: "Stg_Oscillator_Cross"
TestExpert: "Stg_Oscillator_Cross_Zero"
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 @@ -39,14 +39,14 @@ jobs:
include: .
init-platform: true
mt-version: 5.0.0.2361
path: Stg_Oscillator_Cross.mq4
path: Stg_Oscillator_Cross_Zero.mq4
verbose: true
- name: Compile for MQL5
uses: fx31337/mql-compile-action@master
with:
include: .
mt-version: 5.0.0.2515
path: Stg_Oscillator_Cross.mq5
path: Stg_Oscillator_Cross_Zero.mq5
verbose: true
- name: List compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
Expand Down
244 changes: 0 additions & 244 deletions Stg_Oscillator_Cross.mqh

This file was deleted.

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

/**
* @file
* Implements Oscillator Cross strategy.
* Implements Oscillator Cross Zero strategy.
*/

// Includes the main code.
#include "Stg_Oscillator_Cross.mq5"
#include "Stg_Oscillator_Cross_Zero.mq5"
12 changes: 6 additions & 6 deletions Stg_Oscillator_Cross.mq5 → Stg_Oscillator_Cross_Zero.mq5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file
* Implements Oscillator Cross strategy.
* Implements Oscillator Cross Zero strategy.
*/

// Includes conditional compilation directives.
Expand All @@ -23,13 +23,13 @@ input ENUM_LOG_LEVEL Log_Level = V_INFO; // Log level.
input bool Info_On_Chart = true; // Display info on chart.

// Includes strategy.
#include "Stg_Oscillator_Cross.mqh"
#include "Stg_Oscillator_Cross_Zero.mqh"

// Defines.
#define ea_name "Strategy Oscillator_Cross"
#define ea_name "Strategy Oscillator Cross Zero"
#define ea_version "2.000"
#define ea_desc "Strategy based on EA31337 framework."
#define ea_link "https://github.com/EA31337/Strategy-Oscillator_Cross"
#define ea_desc "Strategy based on selected oscillator-type zero-crossable indicators."
#define ea_link "https://github.com/EA31337/Strategy-Oscillator_Cross_Zero"
#define ea_author "EA31337 Ltd"

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

Expand Down
Loading

0 comments on commit f01bf6d

Please sign in to comment.