How to force EA to check for new values only when a bar is completed and new bar is starting - page 2
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
yes, i agree, but the first bit of the loop code
starts from 0, as you say. Or am i wrong? Sorry if I have hijacked your thread.
Marco? is my statement correct?
oops. assuming that ID10Tp is the previous bar.Hi Revo
ID10Tp is actually the look back period :) - so if the value is 100 it will look for the highest and lowest in the past 100 bars.
Copy paste had worked in this case.
But you changed it so that's not exactly copy paste.
Hi Marco - I agree. There is the technical & programmatically correct way and then there is the ID10T copy and paste way that luckily worked in this case :)
I think if I post my EA here you guys are going to have a good laugh and most probably find about every rule in the book bent or thrashed :)
That's ok we have all been there :)
You need to start somewhere.
IMO, if you're going to copy and past then you're better off using a pure function which will not clutter your namespace with extra global variables. This is a cleaner way to implement new bar checking.
IMO, if you're going to copy and past then you're better off using a pure function which will not clutter your namespace with extra global variables. This is a cleaner way to implement new bar checking.
Very nice function!