Skip to content

Commit

Permalink
Merge tag 'v2.008' into dev-3d
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Oct 29, 2021
2 parents d7328b9 + 502cc1f commit 11f94e1
Show file tree
Hide file tree
Showing 231 changed files with 9,763 additions and 4,703 deletions.
128 changes: 128 additions & 0 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
name: Test Indicators

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Indicator**'
- 'Indicators/**'
- '.github/workflows/test-indicators.yml'
push:
paths:
- 'Indicator**'
- 'Indicators/**'
- '.github/workflows/test-indicators.yml'

jobs:

Compile:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Compile
uses: fx31337/mql-compile-action@master
with:
init-platform: true
path: 'Indicators/tests'
verbose: true
- name: Print compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
shell: powershell
- name: Upload artifacts (MQL4)
uses: actions/upload-artifact@v2
with:
name: files-ex4
path: '**/*.ex4'
- name: Upload artifacts (MQL5)
uses: actions/upload-artifact@v2
with:
name: files-ex5
path: '**/*.ex5'

Indicators-Tests-MQL4:
defaults:
run:
shell: bash
working-directory: Indicators/tests
needs: Compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Indi_AC.test
- Indi_AD.test
- Indi_ADX.test
- Indi_ADXW.test
- Indi_AMA.test
- Indi_AO.test
- Indi_ASI.test
- Indi_ATR.test
- Indi_Alligator.test
- Indi_AppliedPrice.test
- Indi_BWMFI.test
- Indi_BWZT.test
- Indi_Bands.test
- Indi_BearsPower.test
- Indi_BullsPower.test
- Indi_CCI.test
- Indi_CHO.test
- Indi_CHV.test
- Indi_ColorBars.test
- Indi_ColorCandlesDaily.test
- Indi_ColorLine.test
- Indi_CustomMovingAverage.test
- Indi_DEMA.test
- Indi_DeMarker.test
- Indi_Demo.test
- Indi_DetrendedPrice.test
- Indi_Drawer.test
- Indi_Envelopes.test
- Indi_Force.test
- Indi_FractalAdaptiveMA.test
- Indi_Fractals.test
- Indi_Gator.test
- Indi_HeikenAshi.test
- Indi_Ichimoku.test
- Indi_Killzones.test
- Indi_MA.test
- Indi_MACD.test
- Indi_MFI.test
- Indi_MassIndex.test
- Indi_Momentum.test
- Indi_OBV.test
- Indi_OsMA.test
- Indi_Pattern.test
- Indi_Pivot.test
- Indi_Price.test
# - Indi_PriceChannel.test
- Indi_PriceFeeder.test
- Indi_PriceVolumeTrend.test
- Indi_RS.test
- Indi_RSI.test
- Indi_RVI.test
- Indi_RateOfChange.test
- Indi_SAR.test
- Indi_StdDev.test
- Indi_Stochastic.test
- Indi_TEMA.test
- Indi_TRIX.test
- Indi_UltimateOscillator.test
- Indi_VIDYA.test
- Indi_VROC.test
- Indi_Volumes.test
- Indi_WPR.test
- Indi_WilliamsAD.test
# - Indi_ZigZag.test
# - Indi_ZigZagColor.test
steps:
- uses: actions/download-artifact@v2
with:
name: files-ex4
- name: Run ${{ matrix.test }}
uses: fx31337/mql-tester-action@master
with:
BtDays: 4-8
BtMonths: 1
BtYears: 2020
TestExpert: ${{ matrix.test }}
60 changes: 60 additions & 0 deletions .github/workflows/test-trade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: Test Trade

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'Trade/**.h'
- '.github/workflows/test-trade.yml'
push:
paths:
- 'Trade/**.h'
- '.github/workflows/test-trade.yml'

jobs:

Compile:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Compile
uses: fx31337/mql-compile-action@master
with:
init-platform: true
path: 'Trade/tests'
verbose: true
- name: Print compiled files
run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname'
shell: powershell
- name: Upload artifacts (MQL4)
uses: actions/upload-artifact@v2
with:
name: files-ex4
path: '**/*.ex4'
- name: Upload artifacts (MQL5)
uses: actions/upload-artifact@v2
with:
name: files-ex5
path: '**/*.ex5'

Trade-Tests-MQL4:
defaults:
run:
shell: bash
working-directory: Trade/tests
needs: Compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- TradeSignalTest
- TradeSignalManagerTest
steps:
- uses: actions/download-artifact@v2
with:
name: files-ex4
- name: Run ${{ matrix.test }}
uses: fx31337/mql-tester-action@master
with:
Script: ${{ matrix.test }}
109 changes: 21 additions & 88 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
- BufferStructTest
- BufferTest
- ChartTest
- CompileIndicatorsTest
- ConditionTest
- DatabaseTest
- DrawIndicatorTest
Expand Down Expand Up @@ -90,93 +91,6 @@ jobs:
BtYears: 2020
TestExpert: ${{ matrix.test }}

Indicators-MQL4:
defaults:
run:
shell: bash
working-directory: Indicators/tests
needs: Compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Indi_AC.test
- Indi_AD.test
# - Indi_ADX.test
- Indi_ADXW.test
- Indi_AMA.test
- Indi_AO.test
- Indi_ASI.test
- Indi_ATR.test
- Indi_Alligator.test
# - Indi_AppliedPrice.test
# - Indi_BWMFI.test
# - Indi_BWZT.test
# - Indi_Bands.test
# - Indi_BearsPower.test
# - Indi_BullsPower.test
# - Indi_CCI.test
# - Indi_CHO.test
# - Indi_CHV.test
# - Indi_ColorBars.test
# - Indi_ColorCandlesDaily.test
# - Indi_ColorLine.test
# - Indi_CustomMovingAverage.test
# - Indi_DEMA.test
# - Indi_DeMarker.test
# - Indi_Demo.test
# - Indi_DetrendedPrice.test
# - Indi_Drawer.test
# - Indi_Envelopes.test
# - Indi_Force.test
# - Indi_FractalAdaptiveMA.test
# - Indi_Fractals.test
# - Indi_Gator.test
# - Indi_HeikenAshi.test
# - Indi_Ichimoku.test
# - Indi_MA.test
# - Indi_MACD.test
# - Indi_MFI.test
# - Indi_MarketFacilitationIndex.test
# - Indi_MassIndex.test
# - Indi_Momentum.test
# - Indi_OBV.test
# - Indi_OsMA.test
# - Indi_Pattern.test
# - Indi_Pivot.test
# - Indi_Price.test
# - Indi_PriceChannel.test
# - Indi_PriceFeeder.test
# - Indi_PriceVolumeTrend.test
# - Indi_RS.test
# - Indi_RSI.test
# - Indi_RVI.test
# - Indi_RateOfChange.test
# - Indi_SAR.test
# - Indi_StdDev.test
# - Indi_Stochastic.test
# - Indi_TEMA.test
# - Indi_TRIX.test
# - Indi_UltimateOscillator.test
# - Indi_VIDYA.test
# - Indi_VROC.test
# - Indi_Volumes.test
# - Indi_WPR.test
# - Indi_WilliamsAD.test
# - Indi_ZigZag.test
# - Indi_ZigZagColor.test
steps:
- uses: actions/download-artifact@v2
with:
name: files-ex4
- name: Run ${{ matrix.test }}
uses: fx31337/mql-tester-action@master
with:
BtDays: 4-8
BtMonths: 1
BtYears: 2020
TestExpert: ${{ matrix.test }}

Scripts-MQL4:
defaults:
run:
Expand All @@ -189,7 +103,6 @@ jobs:
test:
# - 3DTest
- CollectionTest
- CompileIndicatorsTest
- ConfigTest
- ConvertTest
- DateTimeTest
Expand Down Expand Up @@ -236,3 +149,23 @@ jobs:
with:
Script: ${{ matrix.test }}
RunOnFail: "exit 0"

Trade-Tests-MQL4:
defaults:
run:
shell: bash
working-directory: Trade/tests
needs: Compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- TradeSignalTest
steps:
- uses: actions/download-artifact@v2
with:
name: files-ex4
- name: Run ${{ matrix.test }}
uses: fx31337/mql-tester-action@master
with:
Script: ${{ matrix.test }}
2 changes: 1 addition & 1 deletion Action.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Action {
#ifdef INDICATOR_MQH
case ACTION_TYPE_INDICATOR:
if (Object::IsValid(_entry.obj)) {
_result = ((Indicator *)_entry.obj).ExecuteAction((ENUM_INDICATOR_ACTION)_entry.action_id);
_result = ((IndicatorBase *)_entry.obj).ExecuteAction((ENUM_INDICATOR_ACTION)_entry.action_id);
} else {
_result = false;
_entry.AddFlags(ACTION_ENTRY_FLAG_IS_INVALID);
Expand Down
1 change: 0 additions & 1 deletion Bar.enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ enum ENUM_PP_TYPE {
PP_FLOOR = 4, // Most basic and popular type of pivots used in Forex trading technical analysis
PP_TOM_DEMARK = 5, // Tom DeMark's pivot point (predicted lows and highs of the period)
PP_WOODIE = 6, // Woodie's pivot point are giving more weight to the Close price of the previous period
FINAL_ENUM_PP_TYPE_ENTRY
};
23 changes: 23 additions & 0 deletions Chart.define.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,29 @@

/* Defines */

// Define type of timeframe periods using bitwise values.
#define M1B (1 << M1) // 1 minute
#define M2B (1 << M2) // 2 minutes (non-standard)
#define M3B (1 << M3) // 3 minutes (non-standard)
#define M4B (1 << M4) // 4 minutes (non-standard)
#define M5B (1 << M5) // 5 minutes
#define M6B (1 << M6) // 6 minutes (non-standard)
#define M10B (1 << M10) // 10 minutes (non-standard)
#define M12B (1 << M12) // 12 minutes (non-standard)
#define M15B (1 << M15) // 15 minutes
#define M20B (1 << M20) // 20 minutes (non-standard)
#define M30B (1 << M30) // 30 minutes
#define H1B (1 << H1) // 1 hour
#define H2B (1 << H2) // 2 hours (non-standard)
#define H3B (1 << H3) // 3 hours (non-standard)
#define H4B (1 << H4) // 4 hours
#define H6B (1 << H6) // 6 hours (non-standard)
#define H8B (1 << H8) // 8 hours (non-standard)
#define H12B (1 << H12) // 12 hours (non-standard)
#define D1B (1 << D1) // Daily
#define W1B (1 << W1) // Weekly
#define MN1B (1 << MN1) // Monthly

#ifndef __MQL4__
// Chart.
#define CHART_BAR 0
Expand Down
14 changes: 0 additions & 14 deletions Chart.enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,6 @@ enum ENUM_TIMEFRAMES_INDEX {
FINAL_ENUM_TIMEFRAMES_INDEX = 21
};

/* Define type of periods using bitwise operators. */
enum ENUM_TIMEFRAMES_BITS {
M1B = 1 << 0, // =1: 1 minute
M5B = 1 << 1, // =2: 5 minutes
M15B = 1 << 2, // =4: 15 minutes
M30B = 1 << 3, // =8: 30 minutes
H1B = 1 << 4, // =16: 1 hour
H4B = 1 << 5, // =32: 4 hours
H8B = 1 << 6, // =64: 8 hours
D1B = 1 << 7, // =128: Daily
W1B = 1 << 8, // =256: Weekly
MN1B = 1 << 9, // =512: Monthly
};

#ifndef __MQLBUILD__
/**
* Defines chart timeframes.
Expand Down
Loading

0 comments on commit 11f94e1

Please sign in to comment.