No, it's not. When you sold it, it seemed to be written correctly. You fix it first - only the purchase, as I wrote it, and check how it works.
if(Ask - iOpen(NULL,0,0)>=Delta*Point)//Цена выросла на больше или = Delta пунктов{ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-StopLoss*Point,Ask+TakeProfit*Point,
"Купил",MagicNumber,11111,Green);
if(ticket<0){Print("Ошибка открытия ордера BUY #",GetLastError());return(0);}}
For example at StopLoss=49; TakeProfit=37 ; Delta=-32 the system give profit on minutes for 2007. The optimization is not over yet, and I will not wait for its completion. But in principle, the system may work. But we have to do some additional filters. Open time, number of orders opened at the same time, current volatility. Many parameters can be selected for optimization. But whether the system will work in the future is a complicated question.
So you have to edit both lines at once, because the expert does not respect the terms of purchase either... also works the same way as when selling.... How to do that? :)))) My idea of this EA is to make profits on pullbacks.... In my research on the pound, it always rolls back 5-15 pips on sharp jumps, both down and up..... I have a t/r of only 3 pips. Haven't caught an s/l by hand yet
And the delta here, of course, needs to be in external parameters....
That's what I wrote. I only need to select the types of orders to be set as an option. In one case limiters, in the other - stops. And you should select the parameters. But this will be a correction for the history.
Maybe. But the point is important: when you buy, you subtract the open price of the bar. And when you sell - on the contrary, we subtract from the opening price of the bar!
No, it's not. When you sold it, it seemed to be written correctly. You fix it first - only the purchase, as I wrote it, and check how it works.
Here is the whole code.....
Changed the code a little, made extern int Delta;
For example at StopLoss=49; TakeProfit=37 ; Delta=-32 the system give profit on minutes for 2007. The optimization is not over yet, and I will not wait for its completion. But in principle, the system may work. But we have to do some additional filters. Open time, number of orders opened at the same time, current volatility. Many parameters can be selected for optimization. But whether the system will work in the future is a complicated question.
How to do that? :))))
My idea of this EA is to make profits on pullbacks....
In my research on the pound, it always rolls back 5-15 pips on sharp jumps, both down and up..... I have a t/r of only 3 pips. Haven't caught an s/l by hand yet
Buy: a new candle opens and the price goes up - i.e. the buy price should exceed the open price by Delta=30.
i.e. if (Ask - iOpen(NULL,0,0)>=Delta*Point) is the best !
Now reason in the same way for a Sell.
A new candle opens and the price goes down. And we sell, if the open price of the candle is 30 pips higher than the sell price
if ( iOpen(NULL,0,0)- Bid >=Delta*Point)
Here's the whole code.....
Changed the code a bit, made extern int Delta;
And the delta here, of course, needs to be in external parameters....
Here's the whole code.....
Changed the code a bit, made extern int Delta;
And the delta here, of course, needs to be in external parameters....
That's what I wrote. I only need to select the types of orders to be set as an option. In one case limiters, in the other - stops. And you should select the parameters. But this will be a correction for the history.
Buy: a new candle opens and the price goes up - i.e. the buy price should exceed the open price by Delta=30.
i.e. if (Ask - iOpen(NULL,0,0)>=Delta*Point) is the best !
Now reason in the same way for a Sell.
A new candle opens and the price goes down. And we sell, if the open price of the candle is more than the sell price by 30 pips
if ( iOpen(NULL,0,0)- Bid >=Delta*Point)
Not good, Open, Slose, High, Low are based on Bid, and comparing one case with Bid and the other with Ask would be asymmetrical.
(Fucking theatre)))) It turns out I forgot the minus))) It's good that there's an eye-opener here).