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
Point 1.1:
Point 1.2:
Point 1.7:
If you believe the answers are somehow "riddles", then that is exactly the point. They are to serve as hints, advice and guidance but not as final solutions spoon-fed to you.
A programmer is a "problem solver". When faced when a problem, they have to investigate and do research, and then apply thought and logic to come up with a solution.
If we simply give you the final code solution, you learn nothing.You simply see a solution, but don't learn how to do it yourself so that you can apply it in the future. You don't "grow".
You learn, by taking a "hint", so that it guides you while you research and investigate, so that you can develop your skills in logic.
If you don't like that approach, then you are not interested in learning, and you might as well just hire someone to code it for you and be done with it.
Thank you,
Such an explanation I can understand. It is not I wish to be spoon fed, but I need to be able to understand what you're talking about to impliment change.
I did not know it was best to send the source file I will do in future.
I am coding for MT4
As for the crossover I did only need it to detect the trend to filter out which direction to look for trades. That is why I used only part of the suggested code. Is what I done not correct for this?
With all that being said I am not sure what other changes I can do and I still have the same errors and cannot take trades.
Well, let's just say that your code is somewhat "messy" and "stringy". It's logic is convoluted, and should any specific part be slightly changed, the rest will come tumbling down like a house of cards.
A program should be coded so that individual sections are well defined and not too dependant on overall logic, otherwise a slight change somewhere else will have a negative effect overall.
That is why it is best to properly detect a crossover (and not just if it is up or down), and not depend on some other part of the code keeping track if there are open orders or not.
By the way, it is better to detect changes or crossovers based on previous bars and not the current one.
The current bar is still in "flux" and the current closing price has not settled yet, meaning that whether it will close up or down is still unknown, while the previous bar is closed and will not change any more.
You should also only be checking once per bar and not on every tick.
Forgot to mention, that the most recent code you attached, namely CandleBlast.mq4, does not compile. You call a function IsNewTick which has not been declared.