helloea:
purpose:Add two adjacent elements of the close array, and the result is each element of the sum array
problem:
1、I wanted the "sum array" to finish adding once, so I used "break," but the program didn't stop.
2、I hope there are more decimal places, such as EURUSD1.09986, which should be 2.199720 after calculation, one more place than before.
1. you need to show the relevant code including the break that did not work
2. an addition of two values with fixed amounts of decimal places does not result in a value with more decimal places than before
int size=ArraySize(close); double sum[]; ArrayResize(sum,size-1); for(int i=0; i<size-1; i++) { sum[i]=close[i]+close[i+1]; } ArrayPrint(sum,_Digits);
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
purpose:Add two adjacent elements of the close array, and the result is each element of the sum array
problem:
1、I wanted the "sum array" to finish adding once, so I used "break," but the program didn't stop.
2、I hope there are more decimal places, such as EURUSD1.09986, which should be 2.199720 after calculation, one more place than before.