Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 100
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
Hi all! Here's the question. How to measure the distance between High and Low of the first, second, third candle and prescribe the condition that this distance of each candle should not be less than, say, 10 points. Thank you in advance.
Here are the market environment variables to help you https://docs.mql4.com/ru/predefined/variables
Robot uprising... :)
Aha ha ha. yosuf, Cyborg sent you... )))))))
Here's an EA to test the function. It contains the function itself and its call. Before calling it, you have to prepare a message, which can be up to four lines. The length of each line, if I remember correctly, should not exceed 64 characters. That's why I've split one message into several lines. Each line of one message can be output in a different colour. It's kind of clear in the code there - first we prepare message lines, then we call the function. I haven't commented much there - I wrote it in one go long ago. Now I have already forgotten what is there for. If I have any questions, I'll remember, but I remember only necessary things now.
And a turkey:
That's the way it is... I hope you get the hang of it.
Of course, I can make an underlay instead of outputting it to the main chart in the window of the indicator, but I am too lazy ... :)
Artem, I've looked at your code, the turkey is the bomb: )))). In essence, everything is clear with more, although I have seen a couple of points in the implementation, a bit different from what I would have done, but that's just a small thing.
Here's the interesting thing. Only what is in the expert is printed in the turkey. But how do you use it to your advantage?
Artem, I've looked at your code, the turkey is the bomb: )))). In essence, everything is clear with more, although I have seen a couple of points in the implementation, a bit different from what I would have done, but that's only trifles.
Here's what's interesting. Only what is in the Expert Advisor is printed in the turntable. But how do I use it to my advantage?
It is a function. That expert is just for showing what the function does. So use that function to display your messages from your EA.
That expert only shows how to use it.
It is a function. That expert is just for showing what the function does. So use that function to display your messages from your EA.
That expert only shows how to use it.
Although yes... It's a function... I missed the most important thing while I was figuring it out :(
There's a new headache. Here's what it takes to make it happen:
1. There is a number of orders in the market, i.e. there are market and pending orders in the market all the time.
2. At a certain moment when the last order opened so far is closed by a TP, we need to close all the orders that were opened and delete all the pending ones as well.
I did it this way (I put it in the start() function):
Function GetLastOrderState() checks if the last order is closed:
And then functions deleting pending and closing market orders. I see that it's not working correctly somehow. Is my function ok?
I understand that the function is in order by idea. But the logic is not ok here. Do you have any thoughts on this subject? It turns out that, in any case, even when none of the EA's orders has closed by TP, everything is closed in a blink of an eye after it has been opened by the signal...
Aha ha ha. yosuf, Cyborg sent you... )))))))
Still, a good, sympathetic proger. As if all the problems were his, for that fate will reward, unquestionably, or, come across the grail.
But there was no specificity, and therefore no question. I do not know what to answer.... You must try to explain the situation as clearly as possible to get an answer.
There's a new headache. Here's what it takes to make it happen:
1. There is a number of orders in the market, i.e. there are market and pending orders in the market all the time.
2. At a certain moment when the last order opened so far is closed by a TP, we need to close all the orders that were opened and delete all the pending ones as well.
I did it this way (I put it in the start() function):
Function GetLastOrderState() checks if the last order is closed:
And then functions deleting pending and closing market orders. I see that it's not working correctly somehow. Is my function ok?
I understand that the function is in order by idea. But the logic is not ok here. Do you have any thoughts on this subject? It turns out that, in any case, even if none of the EA's orders has closed at TP, everything is closed in a flash after it has been opened by the signal...
Victor, take the tried and tested Kim's function that checks if a position is closed by TP:
isCloseLastPosByTake - Returns a flag to close the last position on the take. Find in Only useful functions
And then close everything.