[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 306

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
Hi everyone, could you please advise how to make the EA give out only one action (buy/sell/signal/message etc.) for 1 candle, i.e. if there is a buy signal, it won't close the buy on this candle, there should be some functions, so as not to try to re-invent the wheel myself
We declare a variable before the EA initiation function:
int myBars;
After the EA's start(){} function, we write a subprogram:
In EA's start() function use this subroutine and variable as follows:
Hello!
I'll start with a simple example, otherwise will be difficult to explain.
double result()
{
double x = Bid;
return(x);
}
double result_y()
{
double y = Bid;
return(y);
}
It needs to be merged into one.
The result() is then needed as X in one function and as Y in the other . Is it possible? How to do it?
double result() // ????
{
double x = Bid;
double y = Ask; // have to return this too
return(x);
return(y); // ?
}
No, there can only be one result. pass the values by reference :
Hello!
I will start with a simple example, otherwise will be difficult to explain.
Send something to the subprogramme so that it can understand what is needed.
Hello!
...
Hello! As people have already commented on your question, I would like to ask you: Are you the 2008 champions ?
If so, could you tell us about your GRAAL, without revealing all the "secrets of the madrid court" and without telling us "all the tales of the Vienna Woods". Just lift the veil a bit... You can - in this branch, I'm sure, people will find it useful!
I'm actively preparing for the Championship myself...
Thank you!
Please tell me, why do you reset a variable to zero when a function is declared? It's right here:
Is this how you set it to the default value if you don't set it explicitly when you call it, or am I wrong?
So is this how it's set to the default value in case it's not explicitly set when called, or am I wrong?
I don't know. But I am interested. I will check it out.
P.S.
It works!
How can I make the difference between open orders of the same sign be 1 bar?