A winning order repeats itself, a losing buy order is followed by a sell order, and a losing sell order is followed by a buy order. Is this EA right?
how many Lot?
and when close those positions?
Let's say 1 lot and the position will be closed when s/l or t/p is reached. When
I run the above, the sell order will repeat when winning and will be followed by
buy order when losing, exactly what I want; but the buy order will be followed
by sell order when winning and will not repeat when losing, which is exactly the
opposite of what I want. Where is the bug?
Thank you for helping.
EAgreat
Thank you for helping.
EAgreat
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
To have my EA do: "A winning order repeats itself, a losing buy order is followed by a sell order, and a losing sell order is followed by a buy order." Is below right?
int order;
if (Ballance!=0.0)
{
if (Ballance>AccountBalance() && OrderType()==OP_BUY)
{
order=OrderSend(Symbol(), OP_BUY, Lot, Ask, 2*Point, Bid-sl*Point, Ask+tp*Point);
}
else if (Ballance>AccountBalance() && OrderType()==OP_SELL)
{
order=OrderSend(Symbol(), OP_SELL, Lot, Bid, 2*Point, Ask+sl*Point, Bid-tp*Point);
}
else if (Ballance<=AccountBalance() && OrderType()==OP_BUY)
{
order=OrderSend(Symbol(), OP_SELL, Lot, Bid, 2*Point, Ask+sl*Point, Bid-tp*Point);
}
else if (Ballance<=AccountBalance() && OrderType()==OP_SELL)
{
order=OrderSend(Symbol(), OP_BUY, Lot, Ask, 2*Point, Bid-sl*Point, Ask+tp*Point);
If wrong, much obliged if you would help.
Merco beaucoup!
Jimmc