ksyusha-Z: The calm before the storm. Let's get ready for another week. Fat profits and skinny (like my chow-chow) elks to you, dear programmers and other profit wrestlers in the coming week.
Thank you! Same to you!
PS Just in case, don't overfeed the doggy this week :)
Hi all, could you please tell me if NULL means any value? Well if I don't want to send a specific value to a function but I want it to be any value. Do I write NULL then in function call?
Hi all, could you please tell me if NULL means any value? Well if I don't want to send a specific value to a function but I want it to be any value. Do I write NULL then in function call?
Is it possible to make it possible not to prescribe the value of variables sent to the function when calling the function? That is, if I don't need, say, to compare OrderOpenPrice, not to rewrite the function again, how can I make the value of OpderOpenPrice always be true when comparing inside the called function? I hope I formulated what I need clearly.
Pyro: Is it possible to make it possible not to prescribe the value of variables sent to the function when calling the function? That is, if I don't need, say, to compare OrderOpenPrice, not to rewrite the function again, how can I make the value of OpderOpenPrice always be true when comparing inside the called function? I hope I formulated what I need clearly.
- Is there a black top and a white bottom? - Yes! - Is there a white top and a black bottom? - Yes!
Which one do you really need? I hope I formulated it clearly?
Pyro: Is it possible to make it possible not to write the value of the variables sent to the function when calling the function...?
This is provided in standard functions for some parameters, it can also be prescribed in user parameters. If there is no such parameter in the call, the default parameter is accepted.
intOrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0,
datetime expiration=0, color arrow_color=CLR_NONE)
Pyro: Is there any way to avoid writing the value of variables sent to the function when calling the function? That is, if I don't need, say, comparison of OrderOpenPrice without rewriting the function, how can I make the value of OpderOpenPrice always be true when making comparison inside the called function? I hope I've made it clear what I need.
You decide which variables you want for the function.
The function will work even if you do not send any variable values to it.
For example:
Function for calculating the current profit for an EA set on a chart:
Hi there! I'm a newbie! Very much needs your advice!!! I was training on the demo, all was normal. I threw it in the real. And messed up so that now I sit and wonder how to fix it. In general, are sets at 1.4057, and bonds 1.4244.Sels and bonds equal in number, 5 pieces.Advice how to get out of this situation.
monstrochka: I need your advice very much!!! I was training on the demo, all was normal. I threw it in the real, and messed up so that now I sit and wonder how to fix it. In general, the seals are at 1.4057, and buy 1.4244. seals and buy equal amounts, 5 pieces. advise how to get out of this situation. because I tried myself, so worse done ((((
Setting locks, i.e. opening equal counter positions, is tantamount to closing a position.
Lock is self-defeating, guided by a passionate desire "not to spoil" the balance sheet picture.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The calm before the storm. Let's get ready for another week. Fat profits and skinny (like my chow-chow) elks to you, dear programmers and other profit wrestlers in the coming week.
Thank you! Same to you!
PS Just in case, don't overfeed the doggy this week :)
Hi all, could you please tell me if NULL means any value? Well if I don't want to send a specific value to a function but I want it to be any value. Do I write NULL then in function call?
Hi all, could you please tell me if NULL means any value? Well if I don't want to send a specific value to a function but I want it to be any value. Do I write NULL then in function call?
Is it possible to make it possible not to prescribe the value of variables sent to the function when calling the function? That is, if I don't need, say, to compare OrderOpenPrice, not to rewrite the function again, how can I make the value of OpderOpenPrice always be true when comparing inside the called function? I hope I formulated what I need clearly.
- Is there a black top and a white bottom?
- Yes!
- Is there a white top and a black bottom?
- Yes!
Which one do you really need? I hope I formulated it clearly?
Is it possible to make it possible not to write the value of the variables sent to the function when calling the function...?
Is there any way to avoid writing the value of variables sent to the function when calling the function? That is, if I don't need, say, comparison of OrderOpenPrice without rewriting the function, how can I make the value of OpderOpenPrice always be true when making comparison inside the called function? I hope I've made it clear what I need.
You decide which variables you want for the function.
The function will work even if you do not send any variable values to it.
For example:
Function for calculating the current profit for an EA set on a chart:
double CurrProfit(){ double Prof=0; for(int cnt=OrdersTotal()-1; cnt>=0; cnt--){ OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==Symbol()){ if(OrderMagicNumber()==Magic){ if(OrderType()==OP_BUY || OrderType()==OP_SELL) Prof+=OrderProfit()+OrderSwap()+OrderCommission(); } } } return(Prof);}The same, but with division of the current profit into profit from buy and sell and for an EA with a specified magic number:
I need your advice very much!!! I was training on the demo, all was normal. I threw it in the real, and messed up so that now I sit and wonder how to fix it. In general, the seals are at 1.4057, and buy 1.4244. seals and buy equal amounts, 5 pieces. advise how to get out of this situation. because I tried myself, so worse done ((((
Setting locks, i.e. opening equal counter positions, is tantamount to closing a position.
Lock is self-defeating, guided by a passionate desire "not to spoil" the balance sheet picture.
Setting locks, i.e. opening equal counter positions, is tantamount to closing a position.
Lock is self-defeating, guided by a passionate desire not to "mess up" the balance sheet picture.