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
Igor Thanks for the features !!!
Is there by any chance no function to determine the loss of an open position..... or did I miss it
There is one:
If you need profit/loss in pips, depending on which position (buy/sell) subtract:
OrderOpenPrice(...) - (Bid or Ask).
list of functions in the html file...
will open in a new window...
;) denjoy...
Igor, if you don't mind, I have dug through everything, but I have not found it. Maybe there is a function in the storerooms that would return the slope angle of the regression line, or the start and end price at a certain number of bars ? I would be very grateful to you....
In the LR equation y(x)=a*x + b
the coefficients can be calculated using these formulas.
factor a
coefficient b
'Regression: what is it?'
Igor, thank you so much.
all found on your website
http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&id=35&func=fileinfoIgor, maybe you have some nice code that calculates the lot for a pending order or position at a specific price, taking into account open positions.
I need to put a pending order for X pips away from the current price but I have to figure out how to correctly calculate the lot, i.e. to make this pending order open 100%. Also I need to take into account swaps, commission, profit and loss of orders.
It would be great if you have time to write such a function.
Igor, can you give us a function to close overlapped orders here ? Maybe someone else would need it. If you are interested and have time for it, of course.
If it's not too much trouble, any tips on how to implement this function in your EA. I tried replacing your function "close profitable ones first" with closing by decreasing lot size. But it keeps getting errors when compiling.
Sincerely, Azer.
StringToArrayInt() function.
ZS. Attached is a script for testing the StringToArrayInt() function.
Experience shows that you may also need a function like StringToArrayStr() - if in your notation... :-)
experience shows that sometimes you also need a function like StringToArrayStr() - if in your notation... :-)
In many programming languages this function is called StrSplit(). I didn't make it up... :-)
The StrSplit() function.
This function splits a string into its substringings so that each substring becomes a separate array element. The separator is defined by a parameter and may be arbitrary. The StrSplit() function returns the number of array elements and accepts the following parameters:
SZU. Attached is a script to test StrSplit() function.
In the LR equation y(x)=a*x + b
the coefficients can be calculated using these formulas.
factor a
coefficient b
'Regression: what is it?'
1. Regression analysis is the study of a process, an object based on a series of observation points about it.
2. Regression equation (regression) :
2.1 The researcher chooses the type of equation which in his opinion is appropriate to the physical nature of the object under study or which is easier to work with. A polynomial is most commonly used.
2.2 For initial studies, a first-degree polynomial, i.e., a straight line, is often used. This is called a linear regression.
2.3 Then, as you wrote, the parameters of this straight line are calculated. If there are more than 2 observation points, the most common method is the "method of least squares". The straight line is drawn so that the sum of the squares of the deviations of the points from the straight line is the smallest.
3. Here the regression refers to a linear regression equation and its graph.