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

 

Good evening everyone!

What function returns the setting time of the last pending order (i.e., not the transformation of a pending order into a market order, but the setting time of a pending order)?

I have looked through all of Kim's functions carefully, but i don't think he has such a function.

Thank you.

 
polycomp:

Please advise what could be causing the following problem.

There is an indicator which uses external functions. The compiled library code is located in the libraries folder, descriptors - in include.

Connection #include <lib_Zemckikh.mqh>. During the first run of the indicator, all library functions work normally, the indicator is displayed on the chart. After a change of parameters (after a new calculation of the indicator) the library functions are not called, the indicator is not displayed, there are no entries in the "Experts" tab after the change of parameters.

If you exclude the connection of the library and place the required functions in the indicator file (compiled directly with the functions), everything works fine.

I can't understand what's wrong. I don't want to pollute the forum, I'm not attaching the codes. If you need it, I'll send it to you in person.


First, print something from the library functions into Print, so that you know whether they are called at all

 
solnce600:

Good evening everyone!

What function returns the setting time of the last pending order (i.e., not the transformation of a pending order into a market order, but the setting time of a pending order)?

I have looked through all of Kim's functions carefully, but i don't think he has such a function.

Thank you.


As far as I remember, we should memorize this time when setting a pending order. You can remember it directly in the comment to the order (or in magik, as a special perversion:).
 
borilunad:


Knowledge is acquired only with adequate effort on your part! Get into daily inquisitive work! Good luck!



Well said!
 
Konstebl:

Please advise how to write the condition correctly:

1.if order symbol = symbol and order magik = 135

2.if there are no BAYSTOP pending orders

3.if there are no open orders BAY OR (if there are) stoploss>open price

4.if price is between MA and fractal up

PLACE PENDING BUYSTOP ORDER

WRITTEN LIKE THIS:

DOES NOT WORK! TELL ME WHAT THE MISTAKE IS!

You should simplify the logic by decomposing everything into elementary actions. Try to break down the nested condition into several consecutive ones, like this:

0. If (NewBar ()==false), then you don't need to do anything at all, right? So exit altogether, nothing to load the processor: return (0) or as desired.

1. enter the buy_flag=false, buystop_flag=false, variables for open and stop price

2. for(int i=0;i<total-1;i++)

{

We have selected an order and checked the symbol and magik;

Check the type: if the order is a buy or a bystop, we set the appropriate flag, remember its ticket, stoploss and open price and exit the loop;

}

If (buy_flag == false AND (buy_flag == false OR stoploss>op price) )

{

If price is between the MA and the fractal

{

{ {

}

}

 
alsu:

First, print something out of the library functions in Print, so that you know if they are called at all

Graphical objects are created in library functions . After the first call, the objects are created and displayed in the terminal window.

At the second call they are not present in the list of objects, which suggests that external functions aren't working during the recalculation of the indicator for some reason, and the terminal doesn't say anything about it.

 
It is not the terminal that is silent, it is you. And it's not the terminal that has stopped displaying these objects, it's you.
 
tara:
It's not the terminal that is silent, it's you. And it's not the terminal that stops displaying these objects, it's you.

Then maybe you can tell me why at first call these same functions draw objects, but at second call they refuse?

And besides, the same functions compiled in the same file with the indicator (without using the library) work fine

 
polycomp:
Then maybe you can tell me why these same functions draw objects when they are called for the first time, but refuse to do so when they are called again?


I will, of course.

Where are the functions, where are the objects?

 
tara:


I'll give you a hint, of course.

Where are the functions, where are the objects?

These are the functions, and the objects are the rectangles that appear on the graph.
Files: