Dear all,
Here is my code:
it works properly if I amend it as "(b+c) + d" or "b+c) - d" but doesn't work when it is "(b+c) / d", what's the problem?
Well if you have the formula that works why not use it ? Perhaps you should explain exactly what the problem is ? what it does wrong or what it doesn't do right or what is not done.
it is because the original formula is (b+c)/d.
I changed it to + and - for testing purpose.
The problem is, when I changed it back to "/", there is nothing shown in the indicator window. If I use + or -, a histogram shown clearly.
it is because the original formula is (b+c)/d.
I changed it to + and - for testing purpose.
The problem is, when I changed it back to "/", there is nothing shown in the indicator window. If I use + or -, a histogram shown clearly.
What does (price1+price2)+price3 mean? An banana + a pear + a apple does not equal some amount of raisins. Meaningless. Whether it shows something is irrelevant.
What does (price1+price2) / price3 = mean? (banana + pear) / apple is meaningless.
The problem is your thinking.
it is because the original formula is (b+c)/d.
I changed it to + and - for testing purpose.
The problem is, when I changed it back to "/", there is nothing shown in the indicator window. If I use + or -, a histogram shown clearly.
1. Prints them
for(int i=0; i<limit; i++) { double b=iBands(NULL,0,20,3,0,PRICE_CLOSE,MODE_UPPER,i); Print ("b ",b); double c=iBands(NULL,0,20,3,0,PRICE_CLOSE,MODE_LOWER,i); Print ("c ",c); double d= iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,i); Print ("d ",d); double result=(b+c) / d; Print ("res ",result); a[i]=result; Print ("a "b); }
2. See Data Window (Ctrl + D)
Dear all,
Here is my code:
it works properly if I amend it as "(b+c) + d" or "b+c) - d" but doesn't work when it is "(b+c) / d", what's the problem?
1.
1. Prints them
2. See Data Window (Ctrl + D)
Thanks, phi.nuts!
really appreciate your help!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear all,
Here is my code:
it works properly if I amend it as "(b+c) + d" or "b+c) - d" but doesn't work when it is "(b+c) / d", what's the problem?