Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1070
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
I think I understood it - the error is that I set global buycloseprice and immediately give it value 0.0. And although after opening a position it takes a specific value, when you turn off the terminal, this value is lost and when you turn it on it takes the original value, i.e. 0.0, and therefore the condition if(Bid>buycloseprice) is respected and the command to close. But how to translate this variable into a global terminal, I do not understand.
Yes, that's what I wanted to tell you. We need to change the order of working with the variable, since it is global at the code level, we should first assign it the necessary value and then compare it with Bid.
On the loop: we have to set the first value of i to =1, right?
No. You have an example of a correct loop below the code:
for (int i=OrdersTotal()-1; i>=0; i--)
On condition and timeBar: condition is for the chosen strategy and timeBar is for opening one trade in a bar, not on each tick. I copied this from somewhere, can't remember. It works.
Can you please tell me how to transfer the terminal settings from a computer running "Windows XP" to a computer running "Windows 7"?
more information in the topic Data directory can't open(Windows 7)
To switch from vin-xp (Hryusha) to Win-7 (Seven), just move the terminal folder and always start the terminal in portable mode. To do this, create (on desktop?) a shortcut to Terminal.exe file. Right-click on the shortcut and select Properties. After the word Terminal.exe add a space and the /portable key
If you run the terminal in Win-7 and higher, it will create MQL4 folders with owls, scripts and indulators. The names and location of folders are very complex
The portable mode is designed to run the program on someone else's computer. In this case, the program does not create extra folders and files on your computer. Everything is done in the folder from which the program is launched. It is convenient when you start the program from a flash drive.
There are tools to convert any (?) program to a portable form. You can find a suite of portable programs - even Microsoft Office! The FireFox portable browser allows you to carry it on a USB stick, along with your favourite settings.1. Move the terminal folder. 2. Run in portable mode as otherwise win-7 will drive MQL4 folder with owls and scripts very far away.
More details in the topic Data directory cannot be opened(Windows 7)
I figured it out. It's working. Thank you! So it turns out that I can run the terminal from a flash drive on different computers and not bother with a bunch of terminals?
... So you can run the terminal from a flash drive on different computers and not bother with a bunch of terminals?