Forum

Moving average EA

I wanted to code an EA that would enter a trade once the moving averages cross and close when they cross again while entering the opposite trade. However, it runs fine only until it opens the second trade which will not close. Do you have an idea what is wrong with my code? double CurrentFast = iMA

MA Crossover EA

Hi, I am having trouble with my MA Crossover EA. I wanted to enter sell positions only when the price (that is set up as 1 day MA) crosses 14 days MA from above. extern int FastMA = 1 ; extern int SlowMA = 14 ; extern double LotSize = 0.01 ; extern int ticketSell; int OnInit () {

Opening both buy and sell EA does not work properly

Hello everyone, I wanted to code an EA that opens both buy and sell positions. When the first one reaches stop loss , it should wait for profit from the second one. As the first one closes, the stop loss of the second one gets modified to the initial Bid/Ask position. Although it works on some