Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
M
MQL4-MQL5 Migration Example - StdDev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
FXcoder
MQL4-MQL5 Migration Example - StdDev
Commits
ffee5ceb
Commit
ffee5ceb
authored
Oct 13, 2019
by
FXcoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix standard functions
parent
b3f553cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
StdDev/StdDev.mq4
StdDev/StdDev.mq4
+4
-4
No files found.
StdDev/StdDev.mq4
View file @
ffee5ceb
...
...
@@ -57,17 +57,17 @@ int OnCalculate(const int rates_total, const int prev_calculated, const datetime
double
dAPrice
,
dAmount
,
dMovingAverage
;
//---- insufficient data
if
(
Bars
<=
ExtStdDevPeriod
)
if
(
rates_total
<=
ExtStdDevPeriod
)
return
(
0
);
//---- bars count that does not changed after last indicator launch.
nCountedBars
=
IndicatorCounted
()
;
nCountedBars
=
prev_calculated
;
//----Standard Deviation calculation
i
=
Bars
-
ExtStdDevPeriod
-
1
;
i
=
rates_total
-
ExtStdDevPeriod
-
1
;
if
(
nCountedBars
>
ExtStdDevPeriod
)
i
=
Bars
-
nCountedBars
;
i
=
rates_total
-
nCountedBars
;
while
(
i
>=
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment