[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 704
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Also Odysseus, in the previous example you had it like this:
And now it's like this:
You didn't delete anything, or am I imagining it?here's the final code
Sergey, I didn't fully understand what exactly you changed, because at the address you provided you need to register to see the source code of CCI Filter.
I found only one error, iWPR has no applied_price parameter, so it is correct:
All, thanks, now rrrrrr works!!!
In principle, there is no difference.
Try my function, it's simple enough, pass the "medj," and the desired trawl as parameters.
This function should be called at start at any place, as long as it starts with every tick.
Obviously, the orders must have different sliders.
Roger:
I get it, you define a variable ro at the beginning of the function, but you don't assign it anywhere, i.e. it's 0.
As usual here ))) As usual to the good people )))
What's the problem, I can't figure it out. Problems with global variables. I do it in indicator code:
Then I try to get the value of a global variable from an Expert Advisor with this code
What am I doing wrong? I was supposed to get either 1 or 2 parameter values, but I got ..... And why do I have to write the name and variable again at the beginning of EA code? They seem to exist as globals, but the compilation does not work without them.Can I open two BUY/SELL positions simultaneously?
I tried it - I wrote simple code which opens BUY and SELL positions simultaneously, connected to EUR/USD in real time, they seem to open.
But that was a demo account and strategy tester, what about in real time, will my brokerage company mind?
I have never tried it before, I don't think that I started this kind of experiment.
int i= GlobalVariableGet(Global);
Can I open two BUY/SELL positions simultaneously?
I tried it - I wrote simple code which opens BUY and SELL positions simultaneously, connected to EUR/USD in real time, they seem to open.
But that was a demo account and strategy tester, what about in real time, will my brokerage company mind?
I have never tried it before, I don't think that I started this kind of thing in real trading.
In general - ask the support team of your DC
In order to read the value of global variables we need another function :)))
So clear, looking in the book and not seeing, works thanks! Moving on) with questions. All about the same global variables. I have added the following condition to the indicator:
I want to define which global variable should be assigned a value, depending on what currency the indicator is based on.
I understand that in the global variable GlobalVariableSet(valuta,param), the name (valuta) should contain the value assigned to it above
call again the global variable in the Expert Advisor code
string valuta="valuta";
int i= GlobalVariableGet(valuta); // but I don't get the value, .... i.e. i get 0. May be it's impossible to change the global variable name this way?
I think I've got it figured out - it turns out that I can't call a global variable with this name, but if I register the string name GlobalVariableGet("EURUSD") it works).
Firstly, from the help
Returns the value of the existing global variable or 0 in case of an error. Call GetLastError() to get error information.
Can you see the contents of the GV, but can't retrieve it?