Candle pattern logic EA question
-
Hi- I am working up this EA and am struggling to get the sell logic working properly. Once I have resolved
I would look to replicate it to the buy side.
The basic logic is:- take note of the Asian high and low (I know this is not the full Asian range, although I read that fxdreema has an issue with going past 00:00 to the previous day, so wanted to cap it there for initial testing)
- wait for price to cross the high
- wait for a 3 candle pattern - bull / bear / bear
- optionally - check that all three candles are still above the Asian high
If all this is correct, trigger a sell.
I am sure I have something wrong in the logic as this is not triggering any sell trades. Previously (and I didn't keep a copy...!) I had this working and it looked promising. I don't have a backup and cannot see what I am doing wrong, except I am sure it is an issue with how I am working through the logic. Any help would be appreciated:
https://fxdreema.com/shared/ErjjuXPUb
-
I recommend to move the daily reset structure to the 'on timer' tab. You will avoid many time issues as per your description. On the other hand I don't fully understand the whole logic behind the sell triggering. Could you please simplify it?
-
Thanks for that! I have moved it and that hasn't remedied it, although I have not used the on time tab before so good to know that is the right place for it.
The core issue seems to be the bull / bear / bear logic. I have stripped this out and when I run this on 5 months worth of data (Pepperstone, Every tick based on real ticks) I only get 9 trades which is wrong.
What this should be doing is looking for a 3 candle pattern of Candle 3 (Bull), Candle 2 (Bear), Candle 1 (Bear) and then trigger the trade.
Would it be possible for you to test this and see if you equally get very few trades?
https://fxdreema.com/shared/ErjjuXPUb -
Reviewing yours launching structure as it is would be very time consuming, I'm afraid. Me recommendation is splitting it into smaller parts, test them separately and find the issue when recombining them one after the next one. That should help you find the issue.
-
Thanks - I recreated the whole EA and now it functions. I think I was not recording the variable correctly and that was the root cause.
Next is to make it profitable!
I still think this might be overly complicated still, although this is what I have tried to group it up as -is this a better layout?:
https://fxdreema.com/shared/DFCUqk7lb -
All EAs can always be improved, but trust me, if it works: DON'T TOUCH IT! That's the sacred rule of all programmers (although I'm not one of them, :))
-
Great - good advice!
I am pretty pleased I can develop a reasonable strategy in fxdreema in a couple of weeks.
I am going to see if I can get the much refined version of this done within the week. -
Congrats. Please don't hesitate to share it here of you make it.
