How to Make EA trade Engulfing candle
-
Hello fellow traders,
I was trying to build an EA that will open trade base on Engulfing candle
Here is my setup, I want to know if am correct, and if not I will gladly wecome any one show me way ...
-
@luckybest
I am not 100% on this but I believe you need to specify the opens and closes with more blocks.
A body size > another body size doesn't mean it is engulfing, it could be larger in nature but greater in pips and be "true" but not engulfing.I think it needs to be something like;
Bearish Engulfing
Block 1-
candle 2 close < (below) candle 1 openBlock 2-
Candle 2 open > (above) candle 1 closeBut then you can also go further and say
Candle 2 close == to candle 1 open
But if true
Candle 2 open must be > candle 1 close
VisversaAnd all need to be met so this would automatically indicate candle 1 is bearish abd the body needs to greater than either side of candle 2.
If this doesn't work I am sorry. I am learning myself.
But don't be afraid to test yours and this on strategy tester. No harmAll the best
-
@surachefx Thanks Appreciated I will try it.
And If anyone with another Idea still welcome ... we are all learning
-
@surachefx is correct, you need to specify more of the parameters of the engulfing pattern. In your post the conditions will pass if the body of candle 1 is greater in size than the body of candle 2, but this is only one of the characteristics of an engulfing pattern for Bearish Engulfing and there could be circumstances where these conditions are true but there is no engulfing pattern.
When creating an EA that trades candle patterns (or any EA for that matter) I find it useful to write down all of the characteristics of the pattern, in a similar way as @surachefx has done above and then identify how fxDreena logic can be used to describe these characteristics. This software is powerful and extensive so there will almost always be more than one way to write an EA to perform a particular task. Running the EA in strategy tester or a demo account and watching it will almost certainly reveal things missed e.g. it picks up too many signals because we haven't specified the minimum size of the candles for the engulfing pattern to be valid.
There is a lot of infomation on this Forum and a quick search on candle patterns will reveal a wealth of information others have already shared. -
@cpbonzo nice and informative comment.
Thanks -
I appreciate all your efforts.
now I was able to search through the forum and came across what you told me to do.
now, here is my challenge, I want to connect block 2 to 9 and block 3 to 15 additional condition to this block Like MA.
I connect it directly but not working -
The Pass block does nothing except trigger the next block to execute and if you connected the chain of blocks to the No Trade block, for example, you would not need the Pass block at all.
To answer your question, you would need to place any additional condition block after the Pass block. As to where, it depends in what order you need things to happen and how often conditions should be checked or action taken. As I suggested, it is good idea to write on a piece of paper the logic of the EA you are designing so you can see the order and then structure the fxDreema blocks to do this. If, for example, you want the conditon in your block 2 to occur before an engulfing bar then place it before the other conditions. Where you place it in relation to the Once Per Bar block depends on how you want the EA to function. Without that block the condition will be checked every tick and passed once the conditions are met therefore activating the next block. The Once Per Bar block in this set up means that the following conditions will only be checked once per bar (as it says) and this is usually at the start of the bar regardless of how many ticks there are. If the conditions are met later in the bar the conditions will not pass until the next bar, assuming the conditions remain the same.
If you remove the once per bar block and, for example, connect your block 2 above the condition blocks 5 and 6 the EA will check for your condition every tick and once passed will check for an engulfing candle as long as your condition is met and every tick all the conditions ar emet it will send an alert and draw an arrow. If you place the Once per bar block betwen the last condition and the alert and arrow blocks these events will only occur once per bar however many times the conditions pass per bar. -
@cpbonzo excellent job, It works perfectly as I followed the explanation
thanks so much -
@surachefx you are the best, it works
-
Me ajuda ai cara, estou criando umas ideias aqui