thanx for you greatly encouraging words kelvinhand.
and i will surly use your completely demystified help.
and i will surly use your completely demystified help.
A. Easy work
1. From the MT4 "extern", create the exact Param/ParamList/ParamToggle for AFL except BarsNumber
2. Copy all the global variables into AFL styles.
B. Will See Errors, subscript out of range
3. Convert the 2 functions into AFL exact.
C. The most difficult part - looping
- MT4 loop from right to left, 0 is the Current Bar and counting backward (previous bar) i+1, ...
- Ami loop from left to right, BarCount-1 is always the Current Bar, so counting backward (previous bar) is i-1
- Since we need to loop from i=0 to BarCount-1, then MT style had to reverse into functions above for ami
4 In the case the Main Looping cannot be start from 0, otherwise subscript out of range again when called the functions
so need an start offset Length.
for(i=Length; i<BarCount; i++)
{
step= func1(..., i);
stepMA=func2(step,...,i);
...
}
Once the above problem solved, the rest of the problem are small issue.
Last edited: