Use meaningful variable names, it makes the code easier to read.
Instead of
double mv90 = iMA(Symbname[i],timeframes[j],MA100,0,method100,price100,shift); double mv91 = iMA(Symbname[i],timeframes[j],MA100,0,method100,price100,shift+1);
use something like
double ma_1 = iMA(Symbname[i],timeframes[j],MA100,0,method100,price100,shift); double ma_1_previous = iMA(Symbname[i],timeframes[j],MA100,0,method100,price100,shift+1);
With the variable names that you are using, I am not even going to try to work out what your code is meant to do.
iADX(Symbname[i],timeframes[j],ADXperiod,PRICE_CLOSE,1,shift);
Use the enum not the buffer number for indicators like ADX, again it makes it easier to read and understand
iADX(MODE_MAIN, MODE_PLUSDI, MODE_MINUSDI).
I receive a PM requesting me to have a look at this thread. Here are my comments:
A moderator and experienced coder has given you some suggestions on how to improve your code readability. Why did you not follow up on it?
The suggestions may not solve the issue, but it will make it easier for us to read your code.
Also, the code you have presented does not seem to be sufficient for us to spot the problem at first glance.
So, I suggest you do as was suggested to improve your code and then make a new post attaching the entire file for review.
I receive a PM requesting me to have a look at this thread. Here are my comments:
A moderator and experienced coder has given you some suggestions on how to improve your code readability. Why did you not follow up on it?
The suggestions may not solve the issue, but it will make it easier for us to read your code.
Also, the code you have presented does not seem to be sufficient for us to spot the problem at first glance.
So, I suggest you do as was suggested to improve your code and then make a new post attaching the entire file for review.
Will do so thank you .
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi I am trying to change the following code so it does
outputs (like in picture) symbols that satisfy the adx cross and/or ma cross
If a symbol just satisfies one condtion it will put 1 after them like in the picture
If the symbol satisfies both it will put 2 after the symbol . x number for x number of condition . I tried to use the for loop and mycount++ as in the bold part inside the function but it does not do what is wanted it does put numbers after the symbols but not how many times the condition are met . How do i go about doing it. Thank you.
At the moment it leaves a space before the symbol if it meets both condition . How to get rid of that empty space and have the correct X after the symbol.