Hi Philippe, many thanks for the warm welcome, it's really appreciated.
Okay, following is the basic premise of the EA as from the original post on FF quite a few years back
"Steve,
I am an intraday trader but am testing a new system and I need an EA. I'm wondering if you would be willing to help me out.
It is a very simple EA, I'm willing to bet one of the simplest you've ever coded. Here is what I am looking for.
Let's assume blue are bullish candles and red are bearish.
Candle prints blue, buy.
Candle prints red, sell.
But have it continuous. Fore example. keep buying on every blue candle close, until a red prints, and then close all and reverse.
Blue-buy, blue-buy, blue-buy, red-close all and sell, red-sell blue-close all and buy etc.
With the following selections
Lot Size
Time Frame
TP and SL (in Pips)
That is it, very simple. Hopefully you could help me out or point me in the right direction.
Cheers!"
Steve was kind enough to code the EA for the OP and it works as he/she intended. So the "backbone" of the EA is fine. However (

) I would need the EA to work in the following manner to suit the trading method that I am developing:
Assume blue are bullish candles and red are bearish.
EA waits for two candles of the same colour (specifically colour, not price, is that possible?) to open a trade at the close of the second candle of the same colour, in the direction implied by the colour of the candle. i.e. two consecutive blue candles (By above definition, bullish) the EA opens a long trade as soon as the second candle has finished printing. (This is the 1st change to the original code, the original only looked for one candle to choose direction) Only one trade is opened,
not continuously as per the original EA (this is the 2nd change)
For short trades, the exact mirror is to take place.
The EA is still designed to be a "continuous-in-the-market" trader, so any long trades are to be replaced by short trades, as per the original code, but, using the above mentioned 2nd candle confirmation entry method.
If I may explain via example:
1st ever Candle: Bull Candle (EA does nothing, it waits for the close of the next candle for confirmation); 2nd Candle bull candle (EA opens trade at close of second candle, long direction); 3rd Candle bull candle (EA does nothing, leaves trade open in long direction); 4th Candle: bull candle (EA does nothing, leaves trade open in long direction; 5th candle: Bear candle (EA does nothing, leaves trade open whilst waiting for a confirmation Bear candle or continuation bull candle); 6th candle: Bull candle (EA does nothing leaves trade open); 7th Candle: Bear Candle (EA does nothing, leaves trade open whilst waiting for a confirmation Bear candle or continuation bull candle); 8th Candle: Bear candle (EA closes open long trade; opens a short position on seeing 2nd confirmation bear candle) and so on and so on..
The user changeable variables of the original code seem fine, with the exception of I would like to elect the TP myself whilst monitoring price action, either manually or by moving up the original stop loss, therefore, I see the parameters as being:
Lot Size
SL (Is it possible to hide this from the broker, just in case?)
NO time frame (The OP requested time frame to be a variable, but later, in consultation with Steve, opted to leave this out, so this must please remain out...)
That's all I can think of at the moment...
Any takers?
Take care,
Hannes
You do not have the required permissions to view the files attached to this post.