[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 84

 
PerlOF:

doubleFreeMarginCheck( string symbol, int cmd, double volume)
Returns the amount of free funds remaining after the specified position is opened at the current price on the current account. If there are not enough available funds, error 134 (ERR_NOT_ENOUGH_MONEY) will be generated.
Parameters:
symbol - Name of the financial instrument which should be traded.
cmd - The trade operation. Can be either OP_BUY or OP_SELL.
volume - Number of lots.
Example:
if(AccountFreeMarginCheck(Symbol(),OP_BUY,Lots)<=0
|| GetLastError()==134) return;
 
PerlOF:

for some reason it's hyphenated.

You're answering off-topic.

Where are the professionals?


Here.

Passed on for you:

 

Where can I download a pure MT4???? terminal? I.e. without binding to a broker or brokerage company.

Who can suggest? I will be very grateful.

 
AndCam:

Where can I download a pure MT4???? terminal? I.e. without binding to a broker or brokerage company.

Who can suggest? I will be very grateful.

usually the latest build from the developers can be found at https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4setup.exe
 
Thank you very much.
 
Good afternoon!
Can you please tell me if it is possible to make the following operation:
I open a trade with lot 2 with a target of 75 pips.
When it reaches 50 pips, I want 50% of the initial lot to be closed.
How can I do it without using manual intervention.
Thank you in advance.
 
aaaaaaaaa:
Good afternoon!
Can you please tell me if it is possible to make the following operation:
I open a trade with lot 2 with a target of 75 pips.
When it reaches 50 pips, I want 50% of the initial lot to be closed.
How can I do it without any manual intervention.
Thank you in advance.
Can you write a script or an Expert Advisor?
 
aaaaaaaaa:
Good afternoon!
Can you please tell me if it is possible to make the following operation:
I open a trade with lot 2 with a target of 75 pips.
When it reaches 50 pips, I want 50% of the initial lot to be closed.
How can I do it without using manual intervention.
Thank you in advance.
You can open 2 positions of 1 lot each. If you want to open only 1 position of 2 lots, you have to close it at 50 pips and open a new 1 lot position with a profit of 25 pips.
 
paladin80:
You can open 2 positions of 1 lot. If you only want to open 1 position of 2 lots, you have to close it at 50 pips and open a new 1 lot position with a profit of 25 pips.

) Why do you do this? How about simply specifying a closing volume of 2 lots in orderclose?
 

I would like to get back to the issue of using iCustom.
Here is a simple "Expert Advisor", which draws a Moving Average:

int init() {
   return;
} // int init()

int deinit() {
   return;
}


int start() {
   int    MA_Period  = 13;
   int    MA_Shift   = 0;
   int    MA_Method  = 0;

   double MA         = iCustom(NULL,0,"Moving Averages",MA_Period, MA_Shift, MA_Method, 0,0);

   return;
} // int start() {

We run it in the Tester and see that the line itself appears only after the Tester finishes its work.
- Why is the line not drawn during work, with every new bar? How to achieve this?
Thank you!

Reason: