Your code won't go to 1000's, the value of counter will stop it at 249.
I find your formatting very confusing.
This should do as you want.
int counter = 250; for(int i = 1; i< counter; i++) { if(High[i] < High[0]) { // draw a line for example break; } }
Your code won't go to 1000's, the value of counter will stop it at 249.
I find your formatting very confusing.
This should do as you want.
I actually figured out the problem with my code not to be this one. As soon as I typed the question and typed the code ( did not copy it from the editor) I realized what my mistake was which is a really small mistake that was causing the bug I was having. I really appreciate your help though. Thank you so much.
I actually figured out the problem with my code not to be this one. As soon as I typed the question and typed the code ( did not copy it from the editor) I realized what my mistake was which is a really small mistake that was causing the bug I was having. I really appreciate your help though. Thank you so much.
Then why didn't you delete your post??
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am having a problem with traversing bars backwards.
I have a condition and if it is not met then I want it to change the bars it is focusing on and look backwards and stop when it meets the condition.
I have this for loop
when I do this, it keeps on incrementing and it does not stop. I want it as soon as it finds the i that is less than current high of candlestick it stops and draws a line for example, but it goes to thousands. Is there a way to go back one by one and check until the condition is met?
I want it to go from 0 to whatever number of candlesticks until it finds it. I know the first if should work and do not stop until it finds it but it does not seem to work that way. I am not sure why