Good evening. I would like to know if anyone uses the indicator for distributing trades by price levels on a given timeframe, which can be downloaded from http://fxcoder.ru/indicators/tpo. If so, how can it be properly analysed? Do you have any information about it?
You missed one and instead of datetime expiration, you wrote colour arrow_color
I am sorry for stupid questions, this is my first EA I am trying to write by myself, all my problems started when I added the trail function, that's why I addressed to you for help in solving my mistakes
The essence of the strategy: Entry by stochastic signal (5,14,3) exit also by stochastic, but with another period (5,3,3). I don't understand how to make an exit by stochastic and not by reverse signal. I have a problem and I have no idea how it can be solved, I will try to explain. So, in the code I posted, there are 2 functions
//+------------------------------------------------------------------+//| подготовить массив тикетов для закрытия |//+------------------------------------------------------------------+void PrepareTicketsToClose(int signal, bool Revers, int & ticketsClose[][2], double & lots[],double arrayTickets[][9])
{
int size=ArrayRange(arrayTickets,0);
//----if (size==0) return;
int i,type,ticket,closeSize;
for (i=0;i<size;i++)
{
type=arrayTickets[i][1];
// если тип ордера не рыночный, то пропускаемif (type>OP_SELL) continue;
if (Revers) // перевернем тип рыночного ордера
{
if (type==OP_BUY) type=OP_SELL; else type=OP_BUY;
}
// тут решаем для каждого открытого ордера его судьбу// оставить в рынке или добавить в массив на закрытиеif (type==OP_BUY)
{
//// код разрешающий оставить покупку// как примерif (signal==OP_BUY) continue;
}
if (type==OP_SELL)
{
//// код разрешающий оставить продажу// как примерif (signal==OP_SELL) continue;
}
closeSize=ArrayRange(ticketsClose,0);
ArrayResize(ticketsClose,closeSize+1);
ArrayResize(lots,closeSize+1);
ticketsClose[closeSize][0] = arrayTickets[i][0]; // # тикета
ticketsClose[closeSize][1] = arrayTickets[i][1]; // тип ордера// здесь укажем сколько лотов нужно закрыть
lots[closeSize] = arrayTickets[i][2]; // закрываемый объем// можно закрывать частично, тогда нужно переписать строку сверху
}
//----return;
}
//+------------------------------------------------------------------+//| Закрывает ордера с указанными тикетами |//+------------------------------------------------------------------+void CloseMarketOrders(int ticketsArray[][2], double lotsArray[])
{
//----int i,size=ArrayRange(ticketsArray,0);
if (size==0) return;
int ticket,type;
double lots;
bool res;
int total=OrdersTotal();
for (i=0;i<size;i++)
{
ticket = ticketsArray[i][0];
type = ticketsArray[i][1];
lots = lotsArray[i];
RefreshRates(); // на всякий случай обновим сведения о рыночном окружении// блок закрытия покупокif (type==OP_BUY)
{
res = OrderClose(ticket,lots,Bid,Slippage,Orange);
if (!res)
{
Print("Не удалось закрыть ордер в покупку #",ticket,"! Ошибка №",GetLastError());
// дальнейшая обработка ошибки, написать самостоятельно
}
}
// блок закрытия продажif (type==OP_SELL)
{
res = OrderClose(ticket,lots,Ask,Slippage,Orange);
if (!res)
{
Print("Не удалось закрыть ордер в продажу #",ticket,"! Ошибка №",GetLastError());
// дальнейшая обработка ошибки, написать самостоятельно
}
}
}
//----return;
}
In void PrepareTicketsToClose(int signal, bool Revers, int & ticketsClose[][2], double & lots[],double arrayTickets[][9]) we have to put a condition that will decide if we should leave or close the order. I tried to put conditions but nothing works.... Can someone look and show if there is an error in these functions or i messed up....
Hello. After running the Expert Advisor in the tester, I need to get information about the total volume of trades made in lots (for example, in the logs). The Expert Advisor has the MM block enabled, the trades are executed in % of free funds, so simply multiplying by the number of trades does not work. Is there a standard function that provides this information (like OrderLots, but with total amount)? If there is no such a function, may someone suggest a simple code for realization of this task? Thank you.
how to open ports for mt4 on ADSL modem via WIFI? I go to the internet on 6 DTs. model tp-link W8901G read that you can open ports for torents can anyone face?
That's how it compiles:
Now when testing does not open a single trade in the log writes Open_BuyS_SellS EURUSD,Daily: OrderSend error 131
Error 131 is incorrect volume. Try lot 1 for example, you might not be allowed to open with 0.01 lot.
Error 131 is incorrect volume. Try lot 1 for example, you might not be allowed to open with 0.01 lot.
Afternoon. Now writes Open_BuyS_SellS EURUSD,H4: OrderSend error 3
Good day. Now it says Open_BuyS_SellS EURUSD,H4: OrderSend error 3
See help for OrderSend parameters and error codes
3 - wrong parameters.
You missed one and instead of datetime expiration, you wrote colour arrow_color
See help for OrderSend parameters and error codes
3 - wrong parameters.
You missed one and instead of datetime expiration, you wrote colour arrow_color
help who knows!!!!
I have a problem and I have no idea how it can be solved, I will try to explain.
So, in the code I posted, there are 2 functions
In void PrepareTicketsToClose(int signal, bool Revers, int & ticketsClose[][2], double & lots[],double arrayTickets[][9]) we have to put a condition that will decide if we should leave or close the order.
I tried to put conditions but nothing works....
Can someone look and show if there is an error in these functions or i messed up....
how to open ports for mt4 on ADSL modem via WIFI? I go to the internet on 6 DTs. model tp-link W8901G read that you can open ports for torents can anyone face?