
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
Thanks again. Was trying out pretty much what you wrote when I was struggling to figure this out last night. Probably would have helped if I had the buffers numbered correctly. haha Problem solved though. Thanks again. On to the next one...
Don't use objects in indicators, an EA can't see them. Place the value in the buffer and use setIndexStyle(0,DRAW_ARROW)
Use the standard code for counting.
I've been playing around with the code for counting and using print to display the bar that is being checked each time. The only way I can get the "while" version to check only the last bar at each tick after all other bars have been checked is with the way I had it coded before.
Thats the only way I can get it to print 10 through 0 and then check bar 0 at every tick. When I do the following method as was suggested: With the above method, it prints 10 through 0 as it should but then goes through 2,1,0 with each tick? Any idea why or how I should have this written so it works properly? I've been trying to figure out the same thing with "for" that I am going to post next. Any suggestions are much appreciated. Thanks again.
And here are my results playing around with "for"
When I try my original version above, it counts 10 through 0 and repeats counting 10 through 0 at every tick? Why is it doing this and how do I code this so it only checks each bar once and then the last bar at each tick?When I write it as suggested above: The above method counts all bars down to 0 and then checks bars 1 and 0 at each tick. Still not what I'm trying to do. Please help...
Ok. A little progress, i still dont think this is quite right though...
The above method does count form 10 to 0 and then checks bar 0 at each tick which is what Im tring to do. It still doesnt seem right to be setting i=Bars-counted_bars-1, then setting i=iHistory, and then setting i = i within the "for" line.Anyone have any suggestions for the above 3 posts? Thanks
Trying to keep one organized thread here of the different questions and problems I come across as I'm learning but not having much luck getting answers and I don't want to fill up the forum by posting repeatedly or starting a new thread with each question. Would I have better luck by starting a new post each time? Still looking for any help or recommendations on the above posts as well as tips on how to best post my questions that will get a few replies. Thanks.