[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 51
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
it's actually like this
print gives _dif = 0.01, but_Lot = 0;Probably set to
int _Lot; //then it will cut off anything less than one
and should be set to:
double _Lot;
Probably set to
int _Lot; //then it will cut off anything less than zero
and should be set to:
double _Lot;
double _Lot;
double _Lot_BUY = 0;
double _Lot_SELL = 0;
double _Lot_BUYSTOP = 0;
double _Lot_SELLSTOP = 0;
here's another construction
doesn't work like this, but in the following example it does
The following message appears in the log
0.01000000 setting2 _Lot = 0.00000000_Lot_BUY = 0.03000000_Lot_BUYSTOP = 0.00000000_Lot_SELL = 0.00000000_Lot_SELLSTOP = 0.02000000
17:07:12 Expert_V3 GBPUSD,M1: invalid lots amount for OrderSend function
However, while 3 SELLSTOPs were missing, it set the first two without problems, but stumbled on the third.
I.e., why it doesn't set lot to 0.01, even though it calculates the _dif variable correctly...
It will only open orders from the second. Not even from the second, but from the third.Is that your idea?
Thank you
Can you please advise whether it is possible to determine the time of the beginning of the trading session (for example, for Moscow it is 10-35, etc.) or just create a variable and write a value in it? This is necessary in order not to place orders at the beginning of the session, but to determine the direction.
Forex trading session timetable
So it is suggested to just use a variable that stores the start of the session. Thank you.
P.S.
Found it in the database. https://www.mql5.com/ru/code/9313