![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
I think it is possible. Apparently, it is necessary to check at each level (at crossing) what is the current lot size of the open position. And exactly by this criterion we should implement a closing mechanism !
Such functions (that returns the lot size) are available in this branch. Look at pp. 17 и 27
Thank you very much ! Hurrah ! Now I can move on. Thank you very much !
In order to determine whether or not additional lot size checks are needed in the OpenPosition() function, you need to see how you calculate the lot size and how and where it is called; I did not see this function in the branch
maybe i missed .
If it's calculated like this https://championship.mql5.com/2012/ru/news, you might get a 134 error and miss the championship :-)
Hi KimIV.sent one thing will have to write it back. I'm not very good at programming and I'm studying to be a trader for 3 weeks. my grammar is not good either.
here. My question is this. Is it possible to make an EA using the CCi indicator?![](https://c.mql5.com/mql4/forum/2008/10/cci_1_small.gif)
Levels CCi 250, 50, -50, -250. The idea is that when it reaches (crosses) -50 and 50, respectively, I would sell or buy. Consider when the deal should stop:
1Then (let's say there is a sale) the graph crosses -250, then it crosses in the opposite direction -250 (you can see on the picture).
2 The chart has not reached 250 and crosses back to 50.
For buying, it is the same but vice versa.
Quote Euro/Dollar, any time frame.
How much would a plush EA like this cost????
If its the same price, can you offer something better?
Thanks in advance. I hope so. Well, I went to a FOREX course.
By the way, forex is a real way to earn bread and butter????
Greetings all.
Found this indicator, changed it a bit - builds good trend lines.
It would be interesting to concoct a function... (it's kind of a KimIV request).
Re.
OpenPosition("GBPJPY", OP_SELL, 0.1, pb+23*po, pb-44*po);
Maybe it would be better to call OpenPosition("GBPJPY", OP_SELL, 0.1, 23, 44);
This suggestion, Sergei, increases convenience of using stops and takes set in pips. What about cases where stops and takes are set by price levels? For example, a stop at the low or high of the previous bar. Or by a line of some sort. Is it translated into points before calling the function and converted back to prices within the function? This is a redundant operation. So I will leave it as it is.
We will consider the GetSizeLot() function later (by the way, it is now called GetLots()). First of all, we need to finish using b-ForTest.mqh and b-Positions.mqh libraries.
The CountOrders() function for the tester.
In my test (intended for use only in the tester of MT4) versions of Expert Advisors, function CountOrders() replaces the following functions: ExistOrders(), ExistPositions(), NumberOfOrders() and NumberOfPositions(). That is, it can give information about the existence of a position or an order of any type, as well as information about the number of trades of each type. Such an exchange has its own advantages, which is expressed in a one-time reference to the orders base for one tick and obtaining all necessary information at once. And the above mentioned functions, especially when used together, each of them works with one and the same order base independently, so they repeatedly make the same calls. As a result, the CountOrders() function can reduce the time of one pass by several seconds, which allows to save hours of optimization.
Function CountOrders() takes the following parameters:
P.S. Attached is a script for testing the CountOrders() function online.
Good afternoon, Igor and everyone else too. I have a problem using GetFractalBar(NULL,0, 0) function. - It returns the fractal bar number by its number. To be more precise, the problem is not with the function. But somewhere near it.
Everything is OK when the comment is displayed with this setting. I HAVE the number of the bar in the corner of the chart.
And everything is OK when I show comment numbers in the corner of the chart. I see min. price values of the bar with the fractal in the left corner.
But further in general it is not clear! As soon as I insert the variable "a" into the comment instead of the function itself, the comment returns 1 in the corner instead of the price value! Here :
I've been sitting for three hours, I don't understand what's wrong! Please tell me if you can....As soon as I insert the variable "a" into the comment instead of the function itself, the comment returns 1 in the corner instead of the price value !
You have declared the variable "a" as an integer variable, i.e:
int a;
You should declare it as a real variable, i.e:
double a;
ModifyOrder() function for the tester.
This is a simplified version of the ModifyOrder() function, published on page 7, and is designed to change the absolute price levels of one pre-selected order or position.
The ModifyOrder() function accepts the following parameters: