Price cross indicator
-
Hi.. How to create EA for the following set of rules:
- Only one trade per day
- For buy, price cross above moving-average-20-simple earlier of the day (got trouble on creating this rule)
- Price then cross previous day resistance
- buy entry trigger
-
I can see you are trying something in your profile, but I don't fully understand your rules here. When you make such robot, you must be absolutely specific in each rule. "earlier of the day" means nothing, as well as "previous day resistance" if that resistance is not a specific value.
What I can say... instead of using AND, just connect the blocks one after another. Be careful with those "Close trades" blocks, you don't want to be in a situation when the condition to open a new trade is the same as the condition to close all trades for more than one tick.
-
Hi..
Thanks for your respond, I'm currently building an EA with several conditions, i'm struggling to meet the requirement for the 1st condition where the candle touch an MA line once (it stays valid for 1 day only) then proceed to check consecutive conditions? -
Maybe by using some Variable like this - https://fxdreema.com/shared/hz8U6c5Ac
This is also something that can be used - https://fxdreema.com/demo/mt4-wait-crossovers -
I have a question about creating a condition when there is no way of knowing its Candle ID. It could have happened one, two, three, or more bars earlier from a second condition that creates the sell signal.
For example, I would like to sell when 2 conditions meet
First Condition
When price touches yellow line MA (Arrow on drawing).Second Condition
Entry sell when MA close below red line (red line on drawing)How can I set this up if I do not know the exact candle ID when it touch the yellow line (first condition). Please see attached image
......
Capture.PNG -
Check what I posted in my previous post.
Also, there is a block "Indicator moves within limits" and this block is something like Condition that iterates through multiple candles
-
Hi.. I need help to create ea for the following conditions:
H1 time frame
Duration: 00:00hrs to 23:00hrsSell condition
- a. Price/ Candlestick(H1) touch MA 20-simple-close OR
b. Price/ Candlestick(H1) crosses below MA20-simple-close
Once either one of this condition meet (valid), then the logic goes to condition 2.
- Price continues to go downwards, then Candlestick (H1-close) is below previous day Candlestick (D1- Index:1)
Once this condition meet (valid), then the logic goes to trigger sell entry
IF condition 1.a OR 1.b do not meet then the logic will not proceed to condition 2 hence sell entry will not trigger.
Hope my explanation is clear and I attached snapshot for further clarification. Really hopeful that you can guide me to create this EA.
......
2016-06-03_1848.png
2016-06-03_1855.png
2016-06-03_1856.png - a. Price/ Candlestick(H1) touch MA 20-simple-close OR
-
In general:
- If at the current moment you can get information about candles and indicator from the history, do that, this is the best way
- Using Variables to store states. You check some condition and set the value of some Variable to something, this is entirely custom. In other blocks you check what is the state (the value of the Variable) and depending on that you do something else. The downside is that if MT4 crashes, Variables are gone, they are temporary memory.
- This https://fxdreema.com/demo/mt4-wait-crossovers. But here all steps must happen one after another. I mean, block 1 will not run again until block 2 passes.