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

v3.004-dev-new (Tasks' code refactor) #745

Open
wants to merge 103 commits into
base: v3.003-dev-new
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
ef21d9a
Task: Moves Task to Task/ directory
kenorb Oct 6, 2021
9ad467e
Renames Condition to TaskCondition
kenorb Oct 6, 2021
54d8c0a
Renames Action to TaskAction
kenorb Oct 6, 2021
a2a642d
TaskAction: Initial code refactor
kenorb Oct 6, 2021
0223234
GHA: Adds tests for Task-related classes
kenorb Oct 6, 2021
d3510a9
Merge tag 'v2.008' into dev-task
kenorb Oct 16, 2021
a8ebb4a
TaskCondition: Code refactor
kenorb Oct 24, 2021
d37cd31
TaskCondition: Code test fixes
kenorb Oct 26, 2021
12dbb36
Task: Code cleanup
kenorb Oct 26, 2021
bec31a5
Task: Adds Taskable class
kenorb Oct 26, 2021
45e0242
Task: Code improvements
kenorb Oct 26, 2021
b086fd9
Task: Adds TaskGetter class
kenorb Oct 26, 2021
d3b8916
Task: TaskGetter: Improves tests
kenorb Oct 27, 2021
ad5c974
Task: Adds TaskSetter class
kenorb Oct 27, 2021
aafa197
Task: Adds Set() integration to Taskable
kenorb Oct 27, 2021
00d470c
Task/TaskGetter: Improves logic and test
kenorb Oct 27, 2021
f1d2100
Merge branch 'dev-v2010' into dev-task
kenorb Oct 29, 2021
ab6228f
Merge tag 'v2.009' into dev-task
kenorb Nov 8, 2021
25945cc
Improves tasks return logic
kenorb Jan 8, 2022
63cb49f
Task: TaskEntry: Uses int for getters
kenorb Jan 15, 2022
8c21c32
EA: Inherits from Taskable
kenorb Jan 15, 2022
691b5a8
Taskable: Inherits from Object
kenorb Jan 15, 2022
9fdb894
Strategy: Inherits from Taskable
kenorb Jan 15, 2022
a223bc3
IndicatorsTest: Fixes Indi_Drawer
kenorb Jan 16, 2022
86b9c39
Task/TaskAction: Adds GetArg()
kenorb Jan 16, 2022
4b9fe80
Indi_Drawer: Do not enforce double
kenorb Jan 16, 2022
0a022cf
Adds Taskable.car.test
kenorb Jan 16, 2022
03bda72
Task/Task: Adds missing virtual methods
kenorb Jan 16, 2022
e5323fb
Task.test: Adds TestTask01()
kenorb Jan 16, 2022
4355fed
Task: Adds TaskObject
kenorb Jan 16, 2022
912e3ef
Task: Improves processing methods
kenorb Jan 17, 2022
99cde57
Task: Adds TaskManager
kenorb Jan 17, 2022
32ec955
Task/TaskObject: Adds support for objects
kenorb Jan 17, 2022
8d74805
Fixed DictObjectIterator's value pointer's cast. Fixed TaskEntry::Get…
nseam Jan 18, 2022
2c81ffd
Merge pull request #635 from nseam/dev-task
kenorb Jan 18, 2022
cb7cd42
Strategy: Integrates TaskManager logic with Task's conditions
kenorb Jan 22, 2022
66fda0d
Task: Fixes TaskAction test
kenorb Jan 22, 2022
d6fb602
GHA: Includes testing on .mq? changes
kenorb Jan 22, 2022
a975c3b
Task: Fixes TaskCondition test
kenorb Jan 22, 2022
6dc2988
Strategy: Renames tsm to tasks
kenorb Jan 22, 2022
1388e14
EA: Integrates TaskManager logic with Task's conditions
kenorb Jan 22, 2022
a602b9d
Task: Adds struct methods for arguments
kenorb Jan 22, 2022
c786bb6
EA/Strategy: Integrates taskable actions
kenorb Jan 22, 2022
2798a65
CompileTest: Adds missing Task includes
kenorb Jan 22, 2022
41d50e4
Trade: Integrates TaskManager logic
kenorb Jan 23, 2022
61b201c
EA: Reenables initial task logic
kenorb Jan 23, 2022
2d6c6cf
EA: Adds test for task init
kenorb Jan 23, 2022
6941c25
Added TaskManager::Add(string _entry) method which creates TaskEntry …
nseam Jan 26, 2022
263f521
Merge pull request #641 from nseam/dev-task
kenorb Jan 27, 2022
d1f9af0
Merge remote-tracking branch 'origin/dev-task' into dev-v2012
kenorb Jan 27, 2022
808037a
Merge remote-tracking branch 'origin/dev-v2011' into dev-v2012
kenorb Jan 30, 2022
a085505
Indi_Drawer will now have max_modes=1 in order to simulate a single, …
nseam Feb 2, 2022
acea0ee
Merge pull request #644 from nseam/dev-v2012
kenorb Feb 2, 2022
243ae3a
Adds CPP tests for Task-related classes
kenorb Jan 31, 2022
5c78a9b
Adds CONTRIBUTING.md file
kenorb Jan 27, 2022
66d9918
WIP. More compatibility with C++.
nseam Feb 3, 2022
d75e229
WIP. More C++ compatibility.
nseam Feb 4, 2022
ce62685
WIP. Fixed SerializerNode and SerializerNodeIterator's loop. Now i'm …
nseam Feb 8, 2022
7ac3b00
WIP. Stuck on const qualifier problems due to usage of Ref<T> type, w…
nseam Feb 9, 2022
4068e6c
WIP. Fixed C++ compilation errors regarding Ref<T> used as non-const …
nseam Feb 16, 2022
0c70d26
Added `-c` option for `g++`
nseam Feb 17, 2022
1928de2
Fixed "cannot instantiate abstract class" due to deserialize code try…
nseam Feb 17, 2022
2416917
Merge pull request #645 from nseam/dev-v2012-task-cpp
kenorb Feb 17, 2022
ee5037b
GHA: Installs Emscripten toolchain
kenorb Feb 17, 2022
bb36286
Got rid of `u(char, int, long)`s so we have `unsigned (char, int, lon…
nseam Feb 18, 2022
730cf0c
Added universal pointer dereference PTR_DEREF instead of '.' operator.
nseam Feb 18, 2022
d022aca
Minor fixes
nseam Feb 18, 2022
12ce161
Renames Collection to Storage/
kenorb Feb 20, 2022
1a5d7ed
C++ minor syntax fixes
kenorb Feb 20, 2022
86ee002
C++ compatibility fixes.
nseam Feb 21, 2022
a960207
Merge pull request #646 from nseam/dev-v2012-emcc
kenorb Feb 21, 2022
47ca5ef
Merge remote-tracking branch 'origin/dev-v2012-emcc' into dev-v2012
kenorb Feb 22, 2022
987923e
Merge pull request #642 from EA31337/dev-v2011
kenorb Jul 2, 2022
b2eb750
Merge tag 'v2.011' into dev-v2012
kenorb Jul 2, 2022
bacdb23
DrawIndicatorTest: Fixes compilation errors
kenorb Jul 2, 2022
d071b2a
GHA: Enables DrawIndicatorTest
kenorb Jul 3, 2022
135ab8d
Merge tag 'v2.011' with hotfix into dev-v2012
kenorb Jul 3, 2022
4d07ee6
Corrects broken links
kenorb Jan 30, 2022
f9afe77
Merge remote-tracking branch 'origin/dev-v2012-renames' into dev-v2012
kenorb Jul 3, 2022
341d2d5
Exchange: Expands test
kenorb Feb 19, 2022
f006428
Account: Renames Account to AccountMt
kenorb Feb 19, 2022
4fa7460
Account/AccountMt: Fixes zero division
kenorb Feb 19, 2022
a8de8fb
Exchange: Uses AccountBase instead of AccountMt
kenorb Feb 22, 2022
6c679d1
IndicatorData: Adds setter for IndicatorDataParams struct
kenorb Jul 7, 2022
a551c51
Fixes spread/deviation limit logic
kenorb Jul 21, 2022
8454f8c
Trade: Checks spread limits
kenorb Jul 22, 2022
4139809
Trade: TradeParams: Adds max_spread
kenorb Jul 22, 2022
c4e8828
Trade/Strategy: Improves logic on detecting defined spread limits
kenorb Jul 22, 2022
c6293a1
Strategy/Trade: Adds log level getters/setters
kenorb Jul 22, 2022
6c30645
EA/Strategy: Fixes log printing based on the level
kenorb Jul 22, 2022
3a57177
EA/Strategy: More fixes for log printing based on the level
kenorb Jul 23, 2022
1ea89bb
Indicator: Fixes timeframe assignment in class constructor
kenorb Jul 23, 2022
56c6103
EA: Fixes recent issue with error during trade request
kenorb Jul 25, 2022
8fe2908
EA/Strategy: Improves trading logic
kenorb Jul 25, 2022
7f0708f
Trade: Disables filling modes for MQL4
kenorb Jul 25, 2022
5be3b25
Trade: TradeParams: Sets log_level in struct constructor
kenorb Jul 26, 2022
92270d8
EA/Strategy/Trade: AddTask: Fixes code syntax to avoid issues with in…
kenorb Jul 28, 2022
ae3cec6
EA/Strategy/Trade: Adds AddTaskObject()
kenorb Jul 28, 2022
8b0a1a6
EA: Sets trade params across all strategies
kenorb Jul 30, 2022
4c39748
Merge pull request #654 from EA31337/dev
kenorb Jul 31, 2022
5e9ef87
Merge tag 'v2.012' into v3.004-dev-new
kenorb Apr 27, 2024
5a5a6e3
Std: Uses Alert() and DebugBreak() for MQL only
kenorb Apr 27, 2024
5cd433f
Taskable: Fixes compilation for Taskable.test.mq4
kenorb Apr 27, 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
3 changes: 3 additions & 0 deletions .github/workflows/compile-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ jobs:
run: emcc "${{ matrix.file }}"
- name: Compile ${{ matrix.file }} via g++
run: g++ -c "${{ matrix.file }}"
- if: failure()
# Force success.
run: exit 0
1 change: 1 addition & 0 deletions .github/workflows/test-account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
test:
- Account.test
- AccountForex.test
- AccountMt.test
steps:
- uses: actions/download-artifact@v2
with:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/test-storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Test Storage

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

jobs:

compile:
name: Compile
uses: ./.github/workflows/compile.yml
with:
artifact_prefix: mt
path: Exchange
skip_cleanup: true

Storage-Tests-MQL4:
defaults:
run:
shell: bash
working-directory: Storage/tests
if: false
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Collection.test
steps:
- uses: actions/download-artifact@v2
with:
name: files-ex4
- name: Run ${{ matrix.test }}
uses: fx31337/mql-tester-action@master
with:
Script: ${{ matrix.test }}
52 changes: 52 additions & 0 deletions .github/workflows/test-task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Test Task

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

jobs:

compile:
name: Compile
uses: ./.github/workflows/compile.yml
with:
artifact_prefix: mt
path: Exchange
skip_cleanup: true

Task-Tests-MQL4:
defaults:
run:
shell: bash
working-directory: Task/tests
if: false
needs: compile
runs-on: ubuntu-latest
strategy:
matrix:
test:
- Task.test
- TaskAction.test
- TaskCondition.test
- TaskGetter.test
- TaskManager.test
- TaskObject.test
- TaskSetter.test
- Taskable.car.test
- Taskable.test
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: 2 additions & 0 deletions .github/workflows/test-trade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ on:
pull_request:
paths:
- 'Trade/**.h'
- 'Trade/**.mq?'
- '.github/workflows/test-trade.yml'
push:
paths:
- 'Trade/**.h'
- 'Trade/**.mq?'
- '.github/workflows/test-trade.yml'

jobs:
Expand Down
12 changes: 6 additions & 6 deletions 3D/Math.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ struct DXQuaternion {
//| DViewport |
//+------------------------------------------------------------------+
struct DViewport {
ulong x;
ulong y;
ulong width;
ulong height;
unsigned long x;
unsigned long y;
unsigned long width;
unsigned long height;
float minz;
float maxz;
};
Expand Down Expand Up @@ -2336,7 +2336,7 @@ float DXSHDot(int order, const float &a[], const float &b[]) {
//+------------------------------------------------------------------+
//| weightedcapintegrale |
//+------------------------------------------------------------------+
void weightedcapintegrale(float &out[], uint order, float angle) {
void weightedcapintegrale(float &out[], unsigned int order, float angle) {
float coeff[3];
coeff[0] = (float)cos(angle);

Expand Down Expand Up @@ -3031,7 +3031,7 @@ void DXSHMultiply4(float &out[], const float &a[], const float &b[]) {
//+------------------------------------------------------------------+
//| rotate_X |
//+------------------------------------------------------------------+
void rotate_X(float &out[], uint order, float a, float &in[]) {
void rotate_X(float &out[], unsigned int order, float a, float &in[]) {
out[0] = in[0];
out[1] = a * in[2];
out[2] = -a * in[1];
Expand Down
1 change: 1 addition & 0 deletions Account/Account.extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

// Includes.
#include "../String.extern.h"
#include "Account.enum.h"

// Define external global functions.
Expand Down
2 changes: 1 addition & 1 deletion Account/Account.struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef __MQL__
// Allows the preprocessor to include a header file when it is needed.
#pragma once
#include "Serializer.enum.h"
#include "../Serializer.enum.h"
#endif

// Forward class declaration.
Expand Down
5 changes: 5 additions & 0 deletions Account/AccountBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ class AccountBase {
*/
AccountBase() { Init(); }

/**
* Class constructor.
*/
AccountBase(AccountBase &_account) { THIS_REF = _account; }

/**
* Class deconstructor.
*/
Expand Down
2 changes: 1 addition & 1 deletion Account/AccountBase.struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef __MQL__
// Allows the preprocessor to include a header file when it is needed.
#pragma once
#include "Serializer.enum.h"
#include "../Serializer.enum.h"
#endif

// Forward class declaration.
Expand Down
Loading
Loading