Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 310

 

Hello!

Could you please tell me if there is an error message on compilation in this example

I can't figure out what h1 variable is, it's supposed to be a hendle file descriptor

and can I add value var2=1.123 to this file, or do I need to create a new file for each variable var?



An example from the MQL4 Reference File operations FileWriteDouble

 int handle; double var1=0.345; handle=FileOpen("mydata.dat", FILE_BIN|FILE_WRITE); if(handle<1) { Print("can't open file error-",GetLastError()); return(0); } FileWriteDouble(h1, var1, DOUBLE_VALUE); // FileClose(handle);
 
oDin48:

I do not know what kind of "Martin"))) No, it's too early for a real account, not a demo yet, but I would like to use a demo of the same brokerage company, which may be a real account afterwards.


And how are the results on the demo, although it is probably too early to talk about them only 3 working days have passed))).
 

Greetings all!

Can you tell me why my EA doesn't close orders on a real account? I checked on the tester... My orders are opening and closing right where they should be.

 

I don't think it should be. Maybe you haven't waited. Or there's something inattentive somewhere.

The code in the studio.

 
hello. Could you please tell me if there is a custom function that would delete the closest order when opening a position. Thank you in advance.
 
I don't quite understand what equity is after all. Is it what's in the account right now, plus what's hanging on to the positions?
 
Vladimirovits:
I don't quite understand what equity is after all. Is it what's in the account right now, plus what's hanging on to the positions?

Equity is how much money you will have in your account if you close all your orders this second.
 
PGM5:
hello. Could you please tell me if there is a custom function that would delete the closest order when opening a position. Thank you in advance.

Hello, rephrase what you are asking, it's not very clear.
 
Thank you very much!!!!
 
ALXIMIKS:

Hi, rephrase what you're asking, it's not very clear.


Thank you for responding. In my EA :

if( condition)

{two buystop and sellstop orders open}

I need to delete the nearest order when one of them opens, because at this moment there may be other orders, farther away from the current price

i can use an open positions counter + script to delete an order (if i'm thinking correctly, i don't know how to do it, i'm just getting started) Thanks in advance for the information.

Reason: