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
Hello. The question is: Can we load the values of ticks (the corresponding prices) for a certain trading period (i.e., for a single candle) into a one-dimensional array? And to do it in such a way that the array is formed during the formation of a candle. Is it realistic in MQL4? I would appreciate your feedback.
It is real. A dynamic array and go.
Realistically. A dynamic array and off you go.
Greetings gentlemen! I don't want this to sound like flooding, but I cannot do without this function. So guys, can someone help me with this function which goes through all orders and deletes two orders at the same time, the one with the smallest lot and negative profit, and the one with the biggest lot and positive profit, also from existing orders.
Try searching forOrderCloseBy
How to make data of all global variables to be saved even after closing the terminal in normal and abnormal mode?
The question concerns variables declared at the beginning of the code like this:
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
extern double VAR1 = 1;
double VAR2[1000];
I need not to lose values of VAR1 and VAR2 (the array is filled with data during Expert Advisor's operation). So far, the only idea is to write data into a file (global.txt) at every tick and then, when the terminal is launched, read from the file (global.txt) and recreate the variables and then write them again at every tick. What other options are there?
How to make sure that data of all global variables are preserved even after the client terminal is closed in normal and abnormal modes?
The question concerns variables declared like this:
extern double VAR1 = 1;
double VAR2[1000];
I need not to lose values of VAR1 and VAR2 (the array is filled with data during Expert Advisor's operation). So far, the only idea is to write data into a file (global.txt) at every tick and then, when the terminal is launched, read from the file (global.txt) and recreate the variables and then write them again at every tick. What other options are there?
Option
Global variables of the client terminal
//--------
Not to be confused with globally declared variables
Question Can I write a program in Metatrader 4 to open from 2 to 250 positions of my choice with a set stoploss and set profit in one click? I don't need to open one manually
Have you found a brokerage company where you can open so many orders for one instrument? Usually 100 orders is a limit for all instruments...
And yes, I could open 100.
Try searching forOrderCloseBy
Thank you! But I have to select tickets of these orders from at least 3 orders, often there are more from 5 to 10 orders, do I have to calculate and compare lots and profits of these orders separately?
The situation is much worse than you imagine. Only one order, selected by OrderSelect(), is available at any given moment. And when the very first order is selected, what should we compare it with? The smart guys really do something like this
Then look at the value of the tickets found - suddenly they are zero!!!The situation is much worse than you imagine. Only one order, selected by OrderSelect(), is available at any given moment. And when the very first order is selected, what should we compare it with? The smart guys really do something like this
Then look at the value of the found tickets - suddenly they are zero!!!Thanks for the help! So far I left it like this, now I decided to change a bit the conditions under which the function is called. And in general, you have helped me a lot))