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

 
Unfortunately, no one has replied about the error when trying to install the 438 build https://www.mql5.com/ru/forum/138609/page425
 

Hello.

Can you tell me what changes I should make to the code so that trailing would trigger immediately and not after I went to profit.

Files:
 
Can you tell me how to get the high and low of the last bar?
 
strongest:
How do I get the high and low of the last bar?


Higth[0]

Low[0]

is the last bar still being drawn. If you want it to be finished, it will be 1 instead of 0.

 

Can you give me a hint?

1. How to call the Klimov function GetTypeLastOpenPos()? and

2. How to get its result?

Something does not work, compiled gives a bracket balance error, although the brackets are fine. Thank you!

 
yosuf:
Unfortunately no one has replied about the error when trying to install the 438th build https://www.mql5.com/ru/forum/138609/page425

I will answer you, Yusuf. It's always a shamanism with me with these updates. I have the terminals in the root of my D drive in folders with my names. In the past it sometimes helped to temporarily move them to C:\Program Files and then, after a successful update, back again. Now, like you, was running 432 build, got a notification to install 438. Agreed, almost everything loaded, terminal rebooted and nothing, no update. Notification again, OK again, and so four times later the 438th build is up.

IMHO, here the problem is related to using updatable software registry of the Windows, and its versions (Windows) have different registry structures. If you have 7 - try to copy terminal folder into Program ...(x86), if XP - just into programs. It will update, I assure you, then move it back into place. Please let me know how it turned out!

 
borilunad:

Can you give me a hint?

1. How to call the Klimov function GetTypeLastOpenPos()? and

2. How to get its result?

Something does not work, compiled gives a bracket balance error, although the brackets are fine. Thank you!

int GetTypeLastOpenPos(string sy="", int mn=-1) 
{
  datetime t;
  int      i, k=OrdersTotal(), r=-1;

  if (sy=="0") sy=Symbol();
  for (i=0; i<k; i++) 
  {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) 
    {
      if ((OrderSymbol()==sy || sy=="") && (mn<0 || OrderMagicNumber()==mn)) 
      {
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) 
        {
          if (t<OrderOpenTime()) 
          {
            t=OrderOpenTime();
            r=OrderType();
          }
        }
      }
    }
  }
  return(r);
  Comment("Typ   ",r);
}
 
borilunad:

Can you give me a hint?

1. How to call the Klimov function GetTypeLastOpenPos()? and

2. How to get its result?

Something does not work, compiled gives error of brackets balance, although the brackets are ok. Thanks!

Description.

Example, place call and get result in expert start function, place function body outside of exp start:

int X = GetTypeLastOpenPos("",-1);

I do not understand - read the order of functions.

 
Roman.:

Description.

For example, place the call and the result in the expert's start function, place the body of the function outside the exp start:

If it is not clear - read the order of working with functions.



Thank you, Roman! I will try again from the oven... :)

 
Roman.:

Description.

For example, place the call and the result in the expert's start function, place the body of the function outside the exp start:

You do not understand - read the order of functions.


Hello Roman! I got confused (2-3-5). Can you tell me from which bar in the past to look for a non-empty value of indicator buffer (specifically - fractal)? j=Bars-CountedBars-1, and further in the zoom loop does not work.

Alternatively, there is an indicator that draws fractals according to its own algorithm, iFractals is not used. Suppose that fractals are drawn in a similar way to the standard one. Please give me the cycle for finding the previous one...!