Triggering a buy or sell based on indicator arrow color
-
Re: Buy and sell based on color change
Hi, I have been struggling for hours with this and I can't seem to make it work.
I tried this: "indicator is visible" and buffer 1 for Buy and buffer 2 for sell
I tried this: buffer 1 >0 for a buy and Buffer 2 > 0 for a sell (histogram type)
I tried this: buffer 1 =!0 for a buy and Buffer 2 =!0 for a sell (histogram type)Indicator: 0_1613082394117_NonLagMA_v7_Arrow (1).mq4


FxDreema code: https://fxdreema.com/shared/kkWj9A0nd
Any help would be appreciated!
-
Here are the buffers for the indicator:

-
@jjtrader It's weird. Your logic is correct and buffers are correctly identified. Honestly I don't know why it isn't working. Have you used this same indicator in previous EAs succesfully?
-
@l-andorrà No, it is the first time I am trying this indicator.
-
@jjtrader Then I strongly recommend you to study it on the 1 minute chart ans wee if it repaints or not before using it. That will save a lot of pain later. If it doesn't, we can move on.
-
@l-andorrà Okay thanks, I'll check it on the 1 min charts.
-
@l-andorrà I followed the 1 min chart for an hour on 3 different pairs color coding the color of each arrow at the close of the candle. The colors did not change once the candle had closed. So, I'm fairly sure that the indicator does not repaint.

Can you figure out how to code it in fxDreema?
-
@jjtrader Excellent. The first thing to do is importing it into your fxDreema account. Here you can find how to do it:
https://fxdreema.com/forum/topic/4208/tutorial-06-my-indicators-in-fxdreema
Once done, we'll continue.
-
@l-andorrà Done!

-
@jjtrader Ok. Everything looks fine so far. Now buid a new EA with the 5 first blocks of youe example above. I mean a new file just drawing the arrow when the indicator is showing one cross or the other.
-
@l-andorrà This is where I am having the difficulty.
One cross over the other (Buffer 1 over Buffer 2) produces no arrows.

Here is how I coded it: https://fxdreema.com/shared/g7YDNmWXc

-
@l-andorrà Okay, I think I got it now! Instead of a cross, I tried indicator appear..
https://fxdreema.com/shared/AYfFrTSWb


This is only the "Buy" side, I would assume that Buffer 2 will work for the "Sell" side.
Thank you for your patience!
-
@jjtrader Excellent! Congratulations. Don't hesitate to be back here for any other question.