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
Thank you for your comment. First I need to clarify that you can do it the way you want, it can be an indicator that can detect and show them, or an EA that can give you the necessary actions such as trading if you want and you can combine them into an advanced EA. to get them all when executed correctly, which will be attached to the chart as one EA. there is no truth or lies here, the purpose here is only educational to share how we can code these types of candlestick patterns, then you can use them in your own
That's what I did, I combined everything into one EA. But when I tried to write it as an Indicator, it still loads as an Expert Advisor in the terminal. Something needs to be changed in the Code, but I don't know what exactly, I don't know much. I also noticed that it needs improvement in the sense that when the Time Frame is changed to another one, the signal remains on the chart and does not correspond to the bar in the same place on the new one. Ideally, when changing it should be deleted or saved only on the Time Frame where it was detected. Just in case I'll put up my collected Code, see what you can tweak or optimise, I just copied from all the Expert Advisors into one, but I think you can declare some variables at the beginning, so as not to repeat in the Code several times.
I did so, merged them all into one EA. But when I tried to write it as an Indicator, it still loads as an Expert Advisor in the terminal. Something needs to be changed in the Code, but I don't know what it is, I don't know much about it. I also noticed that it needs improvement in the sense that when the Time Frame is changed to another one, the signal remains on the chart and does not correspond to the bar in the same place on the new one. Ideally, when changing it should be deleted or saved only on the Time Frame where it was detected. Just in case I'll put up my collected Code, see what you can tweak or optimise, I just copied from all the Expert Advisors into one, but I think you can declare some variables at the beginning, so as not to repeat in the Code several times.
Expert Advisor and indicator differ only in that they have slightly different event handlers and the indicator has the ability to draw lines either on the chart itself or in a separate window when it comes to candlestick patterns, this type of code is completely redundant in other cases and you will only limit the possibilities of your code with these steps. Here you need the right paradigm of indicator construction, I realised this a long time ago and I almost never wrote indicators, I executed everything in the form of an Expert Advisor. Besides, this code is very easy to adapt to trading in the future, if you look carefully at the code you will see that there is work with objects, so why should you limit yourself to the functionality of the indicator? It's all right that you are digging into a human being
I did not get to the point, I wrote that I am not strong in the Code, so I shared my conclusions as a user, and also asked to cut a little something in the Code that I do not know where and how to declare some variables that are repeated. Also recently watched a video that they write an Expert Advisor on an external indicator. That's why I said that if you make an indicator, then you can refer to it in the Expert Advisor and take data from it. Maybe you can correct something if you can?
Very helpful
Thanks for your comment.
I was wondering regarding detecting Engulfing candlesticks, you have used the condition
if(close>open2&&open<close2)for Bullish Engulfing and conditionif(close<open2&&open>close2)for Bearish engulfing. There condition that is true only when there is a gap. I mean how often does the gap occur? I was expecting use code it like thisif(close>open2&&open<=close2)for Bullish Engulfing and conditionif(close<open2&&open>=close2)for Bearish Engulfing. Because under the normal conditions the Open price of Bar 1 and Close price of Bar 2 is exactly the same. You code will detect the Engulfing pattern only when there is a market price gap.So my question is, do you think the pattern became invalid when the close and open prices of Bar 2 and Bar 1 is not the same.
Good stuff. thanks a lot .
What is the condition for both bullish and bearish Marubozu
What is the condition for both bullish and bearish Marubozu
Something like this: