In the forum, sometimes when replying with a quote, the cursor gets into the quote field and does not want to get out of there. There is a way of dealing with this situation:Forum: when you reply, the cursor jumps into the quote
How to write a condition for the EA not to open a deal when there is already an open position, i.e. to check if the order is opened, and if not, it triggers.
How to write a condition for the EA not to open a deal when there is already an open position, i.e. to check if the order is opened, and if not, it triggers.
What command is used?
I do not know about the open position, and about the already open one, approximately like this:
if (поза открыта) {
return;
}
// Далее код, если поза не открыта
Please advise how best to solve the following task:
In the indicator №1 astaticarrayis created and filled.In indicator #2 on eachnew bar you need to get all values of this array from indicator #1.Thank you very much.
artmedia70: Doing everything in one indicator with two loops.
Thank you. I have considered that option and came to a conclusion that this approach complicates the overall architecture for the following reason: my indicator #1 is the system kernel (the amplitude filter of a price series) that a whole family of other indicators is drawn from, it is used by Expert Advisors. I do not want to "fix" the indicator in each of them.
At the moment I see the following solution: I calculate the values of each element of the static array[n] as may be necessary (not on each bar), but at each bar I rewrite all n elements of the array to the last n elements of indicator buffer(because it is dynamic) and address it from other indicators with a standard method. Being aware of the "crookedness" of this solution, I am looking for other ways. I am interested in options of data transfer from static arrays (I'm not sure about variables).
Thanks. I have considered such an option - I came to a conclusion that this approach complicates the overall architecture for the following reason: my indicator #1 is the core of the system (amplitude filter of price series) that a whole family of other indicators is built from, and Expert Advisors use it. I do not want to "fix" the indicator in each of them.
At the moment I see the following solution: I calculate the values of each element of the static array[n] as may be necessary (not on each bar), but at each bar I rewrite all n elements of the array to the last n elements of indicator buffer(because it is dynamic) and address it from other indicators with a standard method. Being aware of the "crookedness" of this solution, I am looking for other ways. I am interested in options of data transfer from static arrays (I'm not sure about variables).
I hope on your help.
In the indicators #2 - #n, get the values of indicator #1 through iCustom(). On each new bar. In the loop.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can you please tell me if the Vendor's signals will be copied when the terminal is switched off?
Your terminal must be switched on. Maybe a VPS would help - not interested.What is a VPS?
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
Shepot, 2014.09.04 20:37
Can you please advise how best to solve the following problem:
In indicator #1 a static array is created and filled. In indicator #2 on each new bar you need to get all the values of this array from indicator #1.
I thank you in advance.
barabashkakvn:
Forum on trading, automated trading systems and testing trading strategies
Shepot, 2014.09.04 20:37
Can you please advise how best to solve the following problem:
In indicator #1 a static array is created and filled. In indicator #2 on each new bar you need to get all the values of this array from indicator #1.
I thank you in advance.
Good afternoon!
Would you please
How to write a condition for the EA not to open a deal when there is already an open position, i.e. to check if the order is opened, and if not, it triggers.
What command is used?
Good afternoon!
Would you please
How to write a condition for the EA not to open a deal when there is already an open position, i.e. to check if the order is opened, and if not, it triggers.
What command is used?
Shepot, 2014.09.04 20:37
Please advise how best to solve the following task:
In the indicator №1 astaticarrayis created and filled.In indicator #2 on eachnew bar you need to get all values of this array from indicator #1.Thank you very much.
artmedia70:Doing everything in one indicator with two loops.
Thank you. I have considered that option and came to a conclusion that this approach complicates the overall architecture for the following reason: my indicator #1 is the system kernel (the amplitude filter of a price series) that a whole family of other indicators is drawn from, it is used by Expert Advisors. I do not want to "fix" the indicator in each of them.
At the moment I see the following solution: I calculate the values of each element of the static array[n] as may be necessary (not on each bar), but at each bar I rewrite all n elements of the array to the last n elements of indicator buffer(because it is dynamic) and address it from other indicators with a standard method. Being aware of the "crookedness" of this solution, I am looking for other ways. I am interested in options of data transfer from static arrays (I'm not sure about variables).
I hope on your help.
Thanks. I have considered such an option - I came to a conclusion that this approach complicates the overall architecture for the following reason: my indicator #1 is the core of the system (amplitude filter of price series) that a whole family of other indicators is built from, and Expert Advisors use it. I do not want to "fix" the indicator in each of them.
At the moment I see the following solution: I calculate the values of each element of the static array[n] as may be necessary (not on each bar), but at each bar I rewrite all n elements of the array to the last n elements of indicator buffer(because it is dynamic) and address it from other indicators with a standard method. Being aware of the "crookedness" of this solution, I am looking for other ways. I am interested in options of data transfer from static arrays (I'm not sure about variables).
I hope on your help.