Arrows on crossover
-
how can I make the ea place buy and sell arrows upon the crossover of MA's after 2 candles?
-
cross would have to be set to ID3 , create object arrow.
-
Hey, actually i have 3 conditions to be met before the EA could place the buy/sell arrows, Buy conditions are:
- fast MA should be above slow MA.
- Base line of the stochastic oscillator should cross above the signal line.
3)Place a buy arrow on the close of the next candle after the crossover. Condition- the opening of this "next" candle should be above fast MA.
sell conditions are opposite.
I have implemented first 2 conditions, but I'm not sure whether I have done it correctly and for the third condition I completely don't know how to implement it. Could you please help me out.
Below is the link to this project.
https://fxdreema.com/shared/2B7v31Y4 -
https://fxdreema.com/shared/DizdxZbZb
make sure all ID number are 1 means the candle has closed otherwise it will trade on open bar.
missed the bit where u said next bar... just make your moving average and stochastic ID2 , if you want a bull or bear bar next ID1
not sure if u wanted bull or bear so made candle open and close above MA. if it was a bull then only open is need because its a given it will close above. could also write candle low less or equal to 50MA so u know its close to MA and not way up there. just drop down menu parameter on candle open/close lots of options there. bull bar would simply be close is greater than open ect..
-
Hey, thanks for you help!
I deleted the LAST conditions for both buy/sell, as I don't mind if the candle closes below 50 MA in buy signal (and opposite for sell). I tested the EA and the problem is that I get multiple arrows on one candle. sometimes I get two buy arrows on one candle and sometimes I get buy and sell both arrows on one candle and also the placement of the arrows are not where they should really be. Could you please have a look and see where the error is? Is that a timeframe problem? Please do have a look at the photos below.

-
@profaalaa You will never get what you want. We gumans can see where the cossing happened, but the MT4 platform is not working that way. It only connects points from candle to candle. Depending on the values of those MA in candle ID 1 and cnadle ID2, for example, lines will be traced and a crossing can happen or not. Sometimes we can see it just in betwee both candles, sometimes closer to candle ID 1 or maybe closer to candle ID2. No EA will ever be able to plot any arrow in between candles. The best you can do is accepting with candle ID to work on.
-
@l-andorrà you got me wrong bro. I know it's not possible to draw the arrow in between the candles neither do i want that. Did I not explain well enough of what I want?
-
@profaalaa Ok. I got it. Did you try max c project?