Create EA from indicator

Hi,

Is there anyone who is able to make a simple EA based on an indicator I am using. The EA should be simple to create however I have no knowledge of how to make an EA.

EA needs to do the following:
When a red bar appears, close any open buy trade and open a sell trade.
When a blue bar appears, close any open sell trade and open a buy trade.
(see attached image as to what the chart looks like with the indicator attached).

EA only needs the following features:
Lot size
Comment (for being able to tell which timeframe trade was placed on)

If you can write an EA with the above let me know how to contact you and I will provide the indicator. The EA will be shared with everyone for free once tested.

Thanks

Michael


I could code that for you but I wont, you have to remember, a red bar only becomes permenently a red bar once it is finished forming, same with a green bar. During the time it is forming the ticks can cause the price to go up, down, up, down, up, down, inside the same bar, so you can only open order when it is finished and this is what would happen in the EA:

Sell orders red line, buy orders green line.

What it amounts to is as you can see there, you will only get profits during a larger price move, the smaller fluctuations would cause regular losses that will outweigh the profits.

yea, remember to look out for repainting bars.

Hi all,
please, can someone give me the right expression of how to obtain, for example, the open price or high of a certain candlestick which is X bars from the candlestick that has a fractal arrow on it?
Thanx.