Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 706

 

Dear programmers, I would be very grateful if you could debug my EA for the new build 670. This EA was written for me and it worked fine with old versions, but it is not working with the new MT4 version. I tried to compile it and got 100 errors. I can't do it myself.

By the way, I don't have anything against it, if my Expert Advisor is useful for someone ......, I will be glad :-)

The Expert Advisor is attached.

Thanks in advance.

Files:
 

Please help. I need to use a loop and have the following variables: t1,t2,t3,t4,t5,t6,t7,t8,t9,t10. Is it possible to use these variables instead of usual counter of i++ type, so that each next loop will use a variable with number 1 more than the previous one. For example, by getting string values(t1,t2,...) in the loop and then refer to the variables themselves through these string values in some tricky way?

 
exsistentia:

Please help. I need to use a loop and have the following variables: t1,t2,t3,t4,t5,t6,t7,t8,t9,t10. Is it possible to use these variables instead of usual counter of i++ type, so that each next loop will use a variable with number 1 more than the previous one. For example, by getting string values(t1,t2,...) in the loop and then refer to the variables themselves through these string values in some tricky way?

array
 
sergeev:
array


Thank you.
 
Geowind64:

Dear programmers, I would be very grateful if you could debug my EA for the new build 670. This EA was written for me and it worked fine with old versions, but it is not working with the new MT4 version. I tried to compile it and it keeps getting 100 errors. I can't do it myself.

By the way, I don't have anything against it, if my Expert Advisor is useful for someone ......, I will be glad :-)

The Expert Advisor is attached.

Thanks in advance.



The dots should be removed from the variable names. There is no error handling, not even a view of the success of the modification.
 
Geowind64:

Dear programmers, I would be very grateful if you could debug my EA for the new build 670. This EA was written for me and it worked fine with older versions, but it is not working with the new version of MT4. I tried to compile it and got 100 errors. I can't do it myself.

By the way, I wouldn't mind if someone had an advisor to help them ...... I'd be only too glad :-)

The Expert Advisor is attached.

Thanks in advance.

Here you go.

P.S. Maybe I should not have corrected it, if (in this form) gave a profit? :)))

Files:
 
Good afternoon, could you please tell me the code. How do I calculate the number of crossings of two MAs in an indicator for a certain period of time. For example for the last 200 bars. So that in each i-th value of the indicator it shows the number of crossings in the previous 200 bars. I thank you in advance.
 

When using the OrderCloseBy(ticket1,ticket2) function, in case of different order volumes, a new order is opened with a new ticket. What is the easiest way to get the number of this ticket other than using the OrderSelect(n,SELECT_BY_POS) function?

P.S. how is the number in the list determined when using the OrderSelect(n,SELECT_BY_POS) f-fi, i.e. is it counted from above or below, does sorting orders by parameters (order, time, type, volume, etc.)?

 
exsistentia:
When using the OrderCloseBy(ticket1,ticket2) function, in case of different order volumes, a new order is opened with a new ticket. What is the easiest way to get the number of this ticket other than using the OrderSelect(n,SELECT_BY_POS) function?
Use the OrderSelect(ticket1 or ticket2, SELECT_BY_TICKET) function and read the order comment. It says to0000000 instead of zeros of the ticket order opened during this operation.
 
AlexeyVik:
using OrderSelect(ticket1 or ticket2, SELECT_BY_TICKET) and read the order comment. It says to0000000 instead of zeros of the ticket order opened during this operation.

In the comment it says "close hedge by #"ticket1"". where ticket1 is the number of the executed order, not the number of the new order.
Reason: