-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3.001-dev-new-cgava' into v3.003-dev-new
* v3.001-dev-new-cgava: GHA: Compile: Support for workflow calls Trade: TradeSignalEnumMacro: Fixes includes to use local path Moves enum macros into the main file and fixes compilation errors Adds a wrapper file for TradeSignalEnumMacro Renames TradeEnumMacro.mq4 to TradeSignalEnumMacro.test.mq5 CGA(Trade): proposal for macor based computation of SIGNAL BUY/SELL CLOSE/BUY composite signal GHA: Compile: Skips clean-up by default Adds EA31337.vscode-mql-tools extension Fixes new lines [end-of-file-fixer] Disables wine package devcontainer: Adds node Adds wine to devcontainer Adds DavidAnson.vscode-markdownlint extension to devcontainer Adds initial .vscode/settings.json
- Loading branch information
Showing
5 changed files
with
119 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.associations": { | ||
"indicatorcandle.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//+------------------------------------------------------------------+ | ||
//| EA31337 framework | | ||
//| Copyright 2016-2021, EA31337 Ltd | | ||
//| https://github.com/EA31337 | | ||
//+------------------------------------------------------------------+ | ||
|
||
/* | ||
* This file is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* Test functionality of TradeSignal class. | ||
*/ | ||
|
||
// Includes. | ||
#include "TradeSignalEnumMacro.test.mq5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
//+------------------------------------------------------------------+ | ||
//| EA31337 framework | | ||
//| Copyright 2016-2021, EA31337 Ltd | | ||
//| https://github.com/EA31337 | | ||
//+------------------------------------------------------------------+ | ||
|
||
/* | ||
* This file is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// Includes. | ||
#include "../../Test.mqh" | ||
#include "../TradeSignal.struct.h" | ||
|
||
int testEnum(){ | ||
uint s; | ||
|
||
s = SIGNAL_CLOSE_BUY_MAIN | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==true ,"Fail!"); | ||
s = SIGNAL_CLOSE_BUY_MAIN | SIGNAL_CLOSE_BUY_FILTER | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
s = SIGNAL_CLOSE_BUY_MAIN | 0 | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
s = SIGNAL_CLOSE_BUY_MAIN | SIGNAL_CLOSE_BUY_FILTER | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
s = 0 | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_CLOSE_BUY_FILTER | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
s = 0 | 0 | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_CLOSE_BUY_FILTER | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_BUY(s)==false,"Fail!"); | ||
|
||
s = SIGNAL_CLOSE_SELL_MAIN | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==true ,"Fail!"); | ||
s = SIGNAL_CLOSE_SELL_MAIN | SIGNAL_CLOSE_SELL_FILTER| 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
s = SIGNAL_CLOSE_SELL_MAIN | 0 | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
s = SIGNAL_CLOSE_SELL_MAIN | SIGNAL_CLOSE_SELL_FILTER | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
s = 0 | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_CLOSE_SELL_FILTER| 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
s = 0 | 0 | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_CLOSE_SELL_FILTER | SIGNAL_CLOSE_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_CLOSE_SELL(s)==false,"Fail!"); | ||
|
||
|
||
s = SIGNAL_OPEN_BUY_MAIN | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==true ,"Fail!"); | ||
s = SIGNAL_OPEN_BUY_MAIN | SIGNAL_OPEN_BUY_FILTER | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
s = SIGNAL_OPEN_BUY_MAIN | 0 | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
s = SIGNAL_OPEN_BUY_MAIN | SIGNAL_OPEN_BUY_FILTER | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
s = 0 | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_OPEN_BUY_FILTER | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
s = 0 | 0 | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_OPEN_BUY_FILTER | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_BUY(s)==false,"Fail!"); | ||
|
||
s = SIGNAL_OPEN_SELL_MAIN | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==true ,"Fail!"); | ||
s = SIGNAL_OPEN_SELL_MAIN | SIGNAL_OPEN_SELL_FILTER | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
s = SIGNAL_OPEN_SELL_MAIN | 0 | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
s = SIGNAL_OPEN_SELL_MAIN | SIGNAL_OPEN_SELL_FILTER | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
s = 0 | 0 | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_OPEN_SELL_FILTER | 0 ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
s = 0 | 0 | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
s = 0 | SIGNAL_OPEN_SELL_FILTER | SIGNAL_OPEN_TIME_FILTER ; assertTrueOrFail(TRADE_SIGNAL_IS_OPEN_SELL(s)==false,"Fail!"); | ||
return INIT_SUCCEEDED; | ||
} | ||
|
||
/** | ||
* Implements OnInit(). | ||
*/ | ||
int OnInit() { | ||
return testEnum(); | ||
} |