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
Input Parameters: |
nm1 - name of the first line |
nm2 - second line name
output M is the price level.
PS. Sorry to the author of this thread for posting my code here. Just thought, maybe someone struggled with crossings too...
It comes to mind (already in the Annals):
PS. I apologise to the author of this thread for posting my code here. Just thought that maybe someone also struggled with intersections...
I tweaked the function a bit. Now it calculates intersections without crashing.
Input Parameters: |
nm1 - first line name |
nm2 - second line name
output M - price level.
PS. I'm sorry to the author of this thread for posting my code here. Just thought, maybe someone struggled with crossing too...
Well, maybe this function should return this very price level (as in the previous variant)! Besides, your code contains an undeclared variable "T".
Well, it returns it)
about undeclared variables - sorry. I stand corrected.
double M - crossing price level. This variable is declared at the beginning.
The trailer is an Expert Advisor to see how the function works.
I couldn't get it to load right away...
I couldn't get it to load right away...
You should not stir the waters, IMHO - bombard the function libraries with descriptions here and that's all...
Those who need it will find it.
The ClosePosByTakeProfitZone() function.
This function closes a position at the market price if the price stomps for a number of bars in the zone close to the TakeProfit or tries to exit this zone. Selection of positions to be closed is specified using external parameters:
Good evening, Igor!
Started studying your functions not too long ago, on page 36 I didn't quite understand the functions, please help me to understand:
Function GetArrowInterval().
//+------------------------------------------------------------------+
//| Returns signal pointer setting interval |
//+------------------------------------------------------------------+
int GetArrowInterval() {
int p = Period();
switch (p) {
case 1: return(4);
case 5: return(5);
case 15: return(6);
case 30: return(8);
case 60: return(10);
case 240: return(20);
case 1440: return(40);
case 10080: return(80);
case 43200: return(150);
} xml-ph-0015@deep
i.e. this function was used to set arrows using SetArrow() function, namely instead of price level in the line ObjectCreate(nm, OBJ_ARROW, 0, 0,0), tell me how it happened, it's not clear to me what the return values mean (4,5,6,8,10....)
The new version of the function also remains unclear://+----------------------------------------------------------------------------+
//| Author : Kim Igor V. aka KimIV, http://www.kimiv.ru |
//+----------------------------------------------------------------------------+
//| Version : 12.10.2007 |
//+----------------------------------------------------------------------------+
//| Description : Returns signal pointer interval |
//| Parameters: |
//| pr - percentage relative to window price size |
//+-------------------
return((WindowPriceMax()-WindowPriceMin())/100*pr/Point);
The WindowPriceMax() function returns the maximum value of the vertical scale, i.e. this is the maximum price value, but over what period?
And thanks for your hard work....))))
Started studying your functions not so long ago, on page 36 I didn't quite understand the functions, please help me to understand:
i.e. this function was used to set arrows using the SetArrow() function, namely instead of the price level in the line ObjectCreate(nm, OBJ_ARROW, 0, 0,0), tell me how this was done...
You must have misunderstood the purpose of these functions. They do not operate with prices and do not put icons; they only return distance in pips depending on the current timeframe. Please refer to the image below.
If you place such a marker not close to the price, but at a certain distance and for example on the H1 timeframe, and then you switch to M1, you will probably not see the marker. The scale will change and the icon will go either far down or up. The functions you mentioned are designed to ensure that the icons are always visible on the chart at any timeframe.
Lisi4ka330:
...what do the return values (4,5,6,8,10....) mean
Distance in pips, depending on the current timeframe.
Lisi4ka330:
WindowPriceMax() function returns the maximum value of the vertical scale, i.e. it is the maximum price value, but over what period?
Not for any period... Just in the current window. For example, in the figure below, the maximum price is 97.35