[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 662
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Correct, because the first parameter returns a number and the second parameter is an integer value within acceptable limits. The whole question is what exactly will go into the variable. Try to print it as is and try this construction:
It's interesting... Made it like this:
Comment displaysAS1 = 0.001 AS2 = 0.001,
In the data window, AC1 = 0.001008, AC2 = 0.001020,
and in the log it says (the last two values):
0.00100029
0.00100771
I can't figure out how to find extrema of a function
I have a data array that stores values:
How to find the fractures - extrema using a data array of 250 elements and store only the element numbers where these extrema are located
Guys, it's a bit complicated :)
You could sketch out a simple method:
You pass the array where you want to find extrema (base) and the array to write them into (find), an example call for the Vladimir array:
double res[]; searchExtremum(my_array, res);
And we show you the result:
It seems easier that way :)It seems to be simpler :)
OK, I'll try to check today, it might be simpler, but I can't get the combination right in my head
void searchExtremums(double base[], double & find[]){
I now need to check functions like these
OK, I'll try to check today, it might be simpler, but I can't get the combination right in my head
void searchExtremums(double base[], double & find[]){
now I need to check such functions
Igor, I already wrote about this in this thread :)))
When you pass a variable to a function, through its parameter, the variable is passed by value, this means that changing the variable in the function itself will not cause it to be overwritten.
Try to pass it by reference, insert an "&" in front of the parameter name
Volfram's post was deleted for propagating in several threads.
Volfram, you have created your own thread specifically for this purpose. You have already been answered; is that not enough?
P.S. Let me tell you a secret, Volfram: the absence of evident interest in your idea implicitly suggests that the idea doesn't deserve any attention. Accordingly, no one was willing to implement it "for a fee".
You've cancelled the email notification option...
How do you even know if someone has replied or not without it? When will you get it back?
It's interesting... I did this:
Comment is displayed at the same timeAS1 = 0.001 AS2 = 0.001,
In data window AC1 = 0.001008, AC2 = 0.001020,
and in the log it says (the last two values):
0.00100029
0.00100771
That's probably up to the developers ;)
It's interesting... I did this:
Comment is displayed at the same timeAS1 = 0.001 AS2 = 0.001,
In data window AC1 = 0.001008, AC2 = 0.001020,
and in the log it says (the last two values):
0.00100029
0.00100771
AC = -0.0004, in the journal -0.00035586
AC2 = -0.0007, journals -0.00068589
I tried it too, everything seems fine, in the comment:
AC = -0.0004, in the journal -0.00035586
AC2 = -0.0007, in the juranle -0.00068589
Comment() seems to round off values internally... And how convenient it is sometimes to see them right there on the screen during visual testing... However, not exactly... :)
Yes, and, by the way, here on a forum on normalization read so from a couple of hours to 7.30 am ...
Normalisation should be done as close to the comparison operation as possible... Therefore, I think I should change some things in some functions and codes... And then the test will show the difference...
Comment() seems to round off values internally... And how convenient it is sometimes to see them right there on the screen during visual testing... However, not exactly... :)
Hello! Can you please explain to me, who is a super dummie in MQL4, what the right thing to do is. I am writing my first EA. I place a SellStop order and after it is triggered, the BuyStop order is placed. I think I need to use OrdeCloseTime. I have tried many variants but the EA only sees the order when OrdeCloseTime==0. After SellStop is closed, SellStop is opened again. I am providing you the code. In this variant, SellStop and BuyStop are opened simultaneously. Please help me. Thank you in advance.
int I = 0;
int start()
{
if (I < 1)
{
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lot,OP_SS,Slippage,SL,CP_SS);
if (ticket>0)
{ Alert("OrderSend"," ",ticket); } else { Alert("!OrderSend","",GetLastError()); }
//--------------------------------------------------------------------------
if (OrderSelect(ticket,SELECT_BY_TICKET)==true)
{ Alert("OrderSelect", ",ticket); } else { Alert("!OrderSelect"," ",GetLastError()); }
//--------------------------------------------------------------------------
OrderSend(Symbol(),OP_BUYSTOP,Lot,OP_BS,Slippage,SL,CP_BS);
}
I=1;
}
return (0);
//--------------------------------------------------------------------------