The logic is lame, everything is there, both arrays for tickets and order types. Only it is not filled when orders are opened, and the array is zeroed out in the TicketLimit function for some reason. At first glance, it looks like that.
How is it like chess? We are missing one move. I will try to analyze it. Thank you, Valery.
Like in chess? One move is missing. I'll try to make sense of it. Thank you, Valery.
в глобальной области
int ind=0, Ind=0;
......
if(ParSar>MaxClose&&chekt==1){
ticket=_OrderSend(NULL,OP_BUYSTOP,0.01,MaxClose+(spread*Point()),0);
ind++;
_Tacket[ind]=ticket; Ind=ind;
}
}
if(MinClose!=0){
if(ParSar<MinClose&&chekt==1){
_price= NormalizeDouble( MinClose-(spread*Point()),Digits);
ticket=_OrderSend(NULL,OP_SELLSTOP,0.01,_price,0);
ind++;
_Tacket[ind]=ticket; Ind=ind;
........
for(i=Ind,i<1,Ind--) // вместо Ind OrderTotal правильнее, если есть и другие ордера в терминале
{OrderSelect( _Tacket[i], SELECT_BY_TICKET )
проверки и действия
}
// Здесь запомнить тикет в массив _тикет и тип ордера тоже и запомнить последний индекс массива!!!
//А потом в Ордер селект подставлять значение массива _тикет) Цикл по индексу массива _тикет от 1 до последнего индекса.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The logic is lame, everything is there, both arrays for tickets and order types. Only it is not filled when orders are opened, and the array is zeroed out in the TicketLimit function for some reason. At first glance, it looks like that.
How is it like chess? We are missing one move. I will try to analyze it. Thank you, Valery.
How do I get the bar stats right?
I did so, counts the number correctly, but when I try to use the data I get "0"
Perhaps there is a normal way, but I "reinvent the wheel")
Please advise.
How do I get the bar stats right?
I did so, counts the number correctly, but when I try to use the data I get "0"
Perhaps there is a normal way, but I "reinvent the wheel")
Please advise.
It looks like you have all int variables and the result of division is less than 0. Therefore, 0;
Try it:
Like in chess? One move is missing. I'll try to make sense of it. Thank you, Valery.
It looks like you have all int variables and the result of division is less than 0. Therefore, 0;
Try it:
Can you tell me if there is a function that simplifies this definition for opening an order?
The idea is that an order is not opened if the price does not fall within this rangeCan you tell me if there is a function that simplifies this definition for opening an order?
The idea is that an order is not opened if the price does not fall into this rangeDraw it on the paper.
OpenPrice _________________________
Bid _________________________
OpenPrice-10*_Point________________________
From the picture you can see that OpenPrice - Bid should not be higher than 10*_Point
Well, draw it on paper.
OpenPrice _________________________
Bid _________________________
OpenPrice-10*_Point________________________
From the picture you can see that OpenPrice - Bid should not be more than 10*_Point
module difference. Without module only the top zone falls into the condition. | OpenPrice - Bid |> 10*_Point opening condition
Well, draw it on paper.
OpenPrice _________________________
Bid _________________________
OpenPrice-10*_Point________________________
From the picture you can see that OpenPrice - Bid should not be higher than 10*_Point
You amaze me.