Wrong. The EA still loses money.
How does that even make sense?
The spread.
How exactly?
The spread is fixed. No variation.
And I tried multiple SL/TP values. They range from 2 to 10 times the amount of spread.
With a 2 pip spread and 20 pip SL and TP
Price has to move 22 pips to hit TP
BUT
Price only has to move 18 pips to hit SL
So it is more likely to hit the SL than the TP no matter what the trade direction is.
With a 2 pip spread and 20 pip SL and TP
Price has to move 22 pips to hit TP
BUT
Price only has to move 18 pips to hit SL
So it is more likely to hit the SL than the TP no matter what the trade direction is.
OK. So I make the TP a little shorter than SL.
Still loses.
Don't forget TP has its own bias. The crossing upwards or downwards constitutes bias towards the direction of the crossing.
OK. So I make the TP a little shorter than SL.
Then your loss making trades will be larger than the profitable trades. This means that you will probably require at least 60% winners just to break even.
Don't forget TP has its own bias. The crossing upwards or downwards constitutes bias towards the direction of the crossing.
Don't forget that you reversed that bias, so you can't have any faith in it.
I tried using the Bid to sell and using the Ask to buy in the strategy tester(Just for debugging, it will not work in the live/demo market).
You should always use Bid for sells and Ask for buys when opening orders. I don't know why you think that will only work in the tester.
You should always use Bid for sells and Ask for buys when opening orders. I don't know why you think that will only work in the tester.
Oh, I mean the opposite. I was trying to figure out why the difference was so huge after the first time I translated my tradingview script which was also my first couple of scripts.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I made an EA.
Fast moving average crosses slow moving average upwards. Open a buy order.
Fast moving average crosses slow moving average downwards. Open a sell order.
SL and TP are always the same distance. Whichever the price hits first wins.
The EA loses money.
In visual mode, it seems that most orders hit SL before they hit TP so the EA loses money.
Well, that is easy to fix, isn't it?
Fast moving average crosses slow moving average upwards. Open a SELL order.
Fast moving average crosses slow moving average downwards. Open a BUY order.
Now the TP mark will be hit more often than the SL mark, right?
Wrong. The EA still loses money.
How does that even make sense?