Skip to content

Commit

Permalink
Refs #11. Fixed warnings. "Compile" GitHub action will now use EA3133…
Browse files Browse the repository at this point in the history
…7-classes v3.000-dev.
  • Loading branch information
nseam committed Nov 7, 2023
1 parent 9c9ac86 commit 7f6450f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
with:
path: Include/EA31337-classes
ref: v3.000.1
ref: v3.000-dev
repository: EA31337/EA31337-classes
- name: Compile (build 2361)
uses: fx31337/mql-compile-action@master
Expand Down
20 changes: 18 additions & 2 deletions Oscillators/SuperSlope.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ int WindowFirstVisibleBar(const long chart_ID = 0) {
return (int)result;
}

int WindowBarsPerChart() { return ChartGetInteger(0, CHART_VISIBLE_BARS, 0); }
int WindowBarsPerChart() {
return (int)ChartGetInteger(0, CHART_VISIBLE_BARS, 0);
}

int ObjectFind(string name) { return ObjectFind(0, name); }

Expand All @@ -70,7 +72,7 @@ bool ObjectSetText(string name, string text, int font_size, string font = "",
if ((StringLen(font) > 0) &&
ObjectSetString(0, name, OBJPROP_FONT, font) == false)
return (false);
if (text_color > -1 &&
if (text_color != CLR_NONE &&
ObjectSetInteger(0, name, OBJPROP_COLOR, text_color) == false)
return (false);
return (true);
Expand Down Expand Up @@ -108,6 +110,20 @@ int WindowFind(string name) {
return (window);
}

// Following methods are only valid when used in MQL4 code.
string StringTrimLeftMQL4(string text) {
StringTrimLeft(text);
return text;
}

string StringTrimRightMQL4(string text) {
StringTrimRight(text);
return text;
}

#define StringTrimLeft StringTrimLeftMQL4
#define StringTrimRight StringTrimRightMQL4

// Includes the main file.
#include "SuperSlope.mq4"

Expand Down

0 comments on commit 7f6450f

Please sign in to comment.