Thx for sharing your works, applications.
i looked at very quickly and want to ask : if i want to use PERIOD_H1 for PERIOD_W1 ; is it enough replace them ?
Thx for sharing your works, applications.
i looked at very quickly and want to ask : if i want to use PERIOD_H1 for PERIOD_W1 ; is it enough replace them ?
The MA group is really a little complicated, let me put it shortly:
At the beginning of the EA run, it executes once to calculate all MA data by MA_BUFFER_LENGTH
for every tick, check if is a new bar, if so, insert new data to masrc or masw1src array, src means source price data.
and then use the src data to calculate latest MA value.
The procedure is similar to the indicator calculation.
So, you should mainly change at two sides:
1. Processing function inside if condition: `if(!had_executed_once && iBars(_symbol, PERIOD_W1) > 18){`
2. RefreshIndicator function
The name logic is that: `calmas` means calculate whole ma line, `updatemas` means update the latest tick.
`xxxmas` for current period, `xxxmasw1` for W1
The MA group is really a little complicated, let me put it shortly:
At the beginning of the EA run, it executes once to calculate all MA data by MA_BUFFER_LENGTH
for every tick, check if is a new bar, if so, insert new data to masrc or masw1src array, src means source price data.
and then use the src data to calculate latest MA value.
The procedure is similar to the indicator calculation.
So, you should mainly change at two sides:
1. Processing function inside if condition: `if(!had_executed_once && iBars(_symbol, PERIOD_W1) > 18){`
2. RefreshIndicator function
The name logic is that: `calmas` means calculate whole ma line, `updatemas` means update the latest tick.
`xxxmas` for current period, `xxxmasw1` for W1
Thx for explanation, i will try with short term instead of "Week"

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
EA Framme:
Official example involve complex wrapper classes, Here is a simple one
Author: Si Jun Tan