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

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
It worked! Honestly, I had this idea of substituting OR for AND.... but ... :)))))))))))))))))))))
thanks ! now i understand the logic, although to count 15 closed ones, i will have to blow the code to the size of a balloon !
Can it all be squeezed into one loop ? and only substitute the parameter of the number of N trades needed ?
Here is one of the possible ways to search for N most recently closed orders, and the sought orders can be filtered by type (BUY, SELL) and profitability (loss-making, profitable):
After fGet_TicketsLastCloseOrd() function is called and it returns the amount of tickets found according to the specified parameters, you can (I would do it) check with the specified amount of tickets (fi_NUM) and the value returned by the function. All collected tickets will be in the array passed to the function by reference.
And in this variant it's not important, how many of these last tickets are searched. :)
And if you need profit by these last closed orders, it's even easier:
Here is one of possible ways to search for N tickets of last closed orders, and you can filter orders by type (BUY, SELL) and profitability (loss-making, profitable):
After fGet_TicketsLastCloseOrd() function is called and it returns the amount of tickets found according to the specified parameters, you can (I would do it) check with the specified amount of tickets (fi_NUM) and the value returned by the function. All collected tickets will be in the array passed to the function by reference.
And in this variant it's not important, how many of these last tickets are searched. :)
And if you need profit by these last closed orders, it's even easier:
Thank you very much. I'll take a break, I need to figure out what's what...
Hello, help me solve this problem: I want one indicator to display eurobucks, dollar index and euro index, but their values are different by several orders. How can I bring them to values of the same order? I think it's not feasible to add multipliers...
Set min and max values of all indicators to the same
Good day to you, my advice to a pro: I wrote an indicator which signals I want to use in my EA. Which will work faster, the indicator function or the transferred indicator?
Thanks
set min. and max. for all indicators to the same
Which ones... I want all this to be shown by one indicator for 3 droline buffers.
tommy27:
How do you bring them to values of the same order?
the scale should be the same
Yes, and to do this, it makes sense to convert all three buffer values before displaying them like this:
Xn=(X-Xmin)/(Xmax-Xmin)
If you do this bluntly, you get something that looks like a horizontal line.
Well, if you use the scaling from MQ, you're good to go.
If it does happen, it won't happen soon, maybe never.
Thanks for the reply.
But I've been using the same suspicious comparison in other code for a long time now.
And it works successfully.
I do not understand why this condition does not work in the last case. I do not see any fundamental differences between these codes.