A quick and free library for MT4, much to the delight of neuralnetworkers - page 51

 

Although, judging by these lines, he set both a take and a stop, but he did it, but he didn't set the stop correctly....

22:00:08 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 1.40257 tp: 0.00000 ok
22:00:08 FANN-EA_3 EURUSD,H1: buy set SL err=0
22:00:09 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 0.00000 tp: 1.41497 ok

 
sergeev:

22:00:09 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 0.00000 tp: 1.41497 ok

stop was removed by a modification


I think it is in the code:) I pressed it wrong way :)

 

I understood that by one order it should open a deal and modify the other: we have the following:

Here we put "22:00:08 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 1.40257 tp: 0.00000 ok" SL, but did not put TP, and here:

22:00:09 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 0.00000 tp: 1.41497 ok we put a TP but zeroed the SL.

Conclusion: The order has been opened, there were two modifications, though I guess we can set both TP and SL with one modification.) We have to correct the code a little bit.

 
marker:

I understood that by one order it should open a deal and modify the other: we have the following:

Here we put "22:00:08 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 1.40257 tp: 0.00000 ok" SL, but did not put TP, and here:

22:00:09 FANN-EA_3 EURUSD,H1: modify #000000000 buy 0.01 EURUSD at 1.40877 sl: 0.00000 tp: 1.41497 ok we put a TP but zeroed the SL.

Right, because the new order parameters were not read after the first modification.

Either we need to make an OrderSelect before the second OrderModify, or we need to pass a new stop loss into it.

 
sergeev:

Right, because the new order parameters were not read after the first modification.

Either OrderSelect must be done before the second OrderModify, or a new stoploop must be passed to it.


I understand logically, but the code language is a forest for me:)

 

But the DC warned me, except I didn't understand what he warned me about bots at first....

 
sergeev:

Right, because the new order parameters were not read after the first modification.

Either OrderSelect must be done before the second OrderModify, or a new stop loss must be passed into it.

Well, yes. A glitch.

Stops were invented by the trusses ))

Files:
fann-ea_3a.mq4  11 kb
 

Let's test the subject:))

Voot, now opyt longer, it seems because of this error opted very quickly, for one, and secondly, if I author bot opyt, then runs at least 15000, with the genetic algorithm of course, and your version suspiciously 8500 passed all, this seems to take longer to load, seems all right, opyt, display, test, I will finish it:))))

 

By the way.

What are the restrictions of the DC that you cannot set SL and TP with the OrderSend function?

 
lasso:

By the way.

What are the restrictions of the DC that you cannot set SL and TP with the OrderSend function?


By the way I don't even know)) When you click to open an order, it just gives the market price and that's it, either buy or sell, and the SL and TP are inactive buttons.....
Reason: