[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 356

 
Vekker >> :

By any chance the int... now I see.

It happens...

;)


To make a difference in usual pips and ints, you have to do the following:

Kurs = (Close1-Close2)/Point;

 
kombat писал(а) >>

It happens...

;)

To receive a difference in usual pips and ints, you should do the following:

Kurs = (Close1-Close2)/Point;

Thank you. In my case I needed only plus or minus sign.

 

Hello!

1) Please tell me what you need to add in the code so that when you run the script in the tab general (automatic trading) already had a check to allow the advisor to trade, and that it would not have to put yourself

2) The situation is as follows, I open 1 lot, I want to close in two runs at 0.5 lots. For example, I want to open 0.5 lots, when my 100 pips are passed, and I want to open the second 0.5 lot, when my 200 pips are passed. Accordingly, I cannot close the order by myself, because it may happen at night and I will sleep. Of course, I can write an EA, which closes all these orders at 100 and 200 pips, but what I will do if the Internet or the light switch off and the EA does not work. Take Profit can only be put for the entire 1 lot. How do I get out of this situation? Is it possible to place a Take Profit for half a lot in MQL5 and another Take Profit for the second half a lot?

 
Vini >> :

Hello!

1) Please tell me what to add in the code that when you run the script in the tab general (automatic trading) already had a checkbox to allow the advisor to trade, and that it would not have to put yourself

2) The situation is as follows, I open 1 lot, I want to close in two runs at 0.5 lots. For example, I want to open 0.5 lots when 100 pips have passed, and I want to open the second 0.5 lot, when 200 pips have passed. Accordingly, I cannot close the order by myself, because it may happen at night and I will sleep. Of course, I can write an EA, which closes all these orders at 100 and 200 pips, but what I will do if the Internet or the light switch off and the EA does not work. Take Profit can only be set to the full 1 lot. How to deal with this situation? Is it possible to place Take Profit for half a lot and another Take Profit for the other half of a lot in MQL5?

1. menu>Settings > EAs > Allow EA to trade (tick the box)

2. MT4 has a function to close overlapped orders (located in the same place as the modify order function). Suppose you have 1 lot for BUY and 0.5 for SELL, this function allows you to choose 0.5 lot and close it.

 
sanyooooook >> :

1. Menu >Settings > EAs > Allow EA to trade (put a tick in the box)

2. MT4 has a function to close overlapped orders (it is in the same place as modify order). Suppose you have 1 lot for BUY and 0.5 for SELL, this function allows you to choose 0.5 lot, and close it.

1. Menu > Tools > Settings > EAs > Allow EA to trade (tick the box)

 

1) ok

2) yes it can be done with a lock, but I am interested in not using a lock, because there is no lock in MT5, I need 1 lot for BUY and I need to close it twice for 0.5 pips, for 100 pips first time and for 200 pips second time

 
Vini >> :

1) ok

2) yes it can be done with a lock, but I am interested in not using a lock, because there is no lock in MT5: 1 lot for BUY and I need to close it twice for 0.5 pips, 100 pips first time and 200 pips second time

I have an option to close a lot for 1 and open a 0.5 lot, but I lose the spread.

 
sanyooooook >> :

An option is to close a lot at 1 and open a 0.5 lot, though the spread is lost, but it totals something

Or put profit on 100 and there pending on 0.5

 
Yes it's a good option, I don't think there are any other options, so this one will do, thank you.
 
Reshetov >> :

Cardinally. No holding open positions and then there will be no drawdown.

I.e. the ratio of TP to SL in each trade must be very close? (fixed?).

Reason: