
Originally Posted by
inkuumba
Hey Funyoo,
I was trying to code an EA by inserting the following main signal in your EA system. I hope I am not infriging too much on your rights.
Hi inkuumba,
No pb, as long as you don't erase the header (of course you can add "modified by inkuumba") and you don't sell it.

Originally Posted by
inkuumba
The problem is I want the EA to close any open trade at the end of the candle even if the trade does not reach take profit .
Is it possible to suggets how one may acheive this with your EA system.
Or use my main signal to produce an EA so others may try it out. It shows good potential on 30M or H1 with the proper stoploss.
Thanks,
inkuumba
//main signal
string SBUY="false";string SSEL="false";
bool buy= Open[1]-Close[1]>0&&High[1]-Low[1]>=15*Point&&Bid >= Close[1]+SignalPips*Point &&
Bid <= Close[1]+SignalPips*Point+Slippage*Point&&Low[0]<=Low[1]&&High[0]<Close[1]+(Slippage+SignalPips)*Point&&MathAbs(Close[1]-Open[0])<Slippage*Point;
bool sell= Close[1]-Open[1]>0&&High[1]-Low[1]>=15*Point&&Bid <= Close[1]-SignalPips*Point &&
Bid >= Close[1]-SignalPips*Point-Slippage*Point&&High[0]>=High[1]&&Low[0]>Close[1]-(Slippage+SignalPips)*Point&&MathAbs(Close[1]-Open[0])<Slippage*Point;
if(buy)SBUY="true";
if(sell)SSEL="true";
This is a good question.
I suggest you to close the order with this :
Code:
int m,s,k;
m=Time[0]+Period()*60-TimeCurrent();
s=m%60;
m=(m-m%60)/60;
condition :
It will close the order in the 10 last seconds of the bar before the close.