SkyTreker: Can anyone suggest how to get (catch) the moment when a position is closed in MT5? Actually, you need to get the properties of the last closed position.
Good afternoon! Can you give me a hint, I can't manage the query structure. I must have forgotten. Probably something stupid, tympiracy. Actually, I wanted to know what the lot is equal to.
//+------------------------------------------------------------------+//| депозита.mq5 |//| Copyright 2012, MetaQuotes Software Corp. |//| http://www.mql5.com |//+------------------------------------------------------------------+#property copyright "Copyright 2012, MetaQuotes Software Corp."#property link "http://www.mql5.com"#property version "1.00"//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+intOnInit()
{
//---Print ( ACCOUNT_BALANCE );
MqlTradeRequest request={0};
MqlTradeResult result={0};
structMqlTradeRequest
{
ENUM_TRADE_REQUEST_ACTIONS action=TRADE_ACTION_DEAL; // Тип выполняемого действияdouble volume=1; // Запрашиваемый объем сделки в лотах ENUM_ORDER_TYPE type=ORDER_TYPE_SELL; // Тип ордера
}
//---return(0);
}
//+------------------------------------------------------------------+//| Expert deinitialization function |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
//---
}
//+------------------------------------------------------------------+//| Expert tick function |//+------------------------------------------------------------------+voidOnTick()
{
//---
}
//+------------------------------------------------------------------+
intCopyHigh(
string symbol_name, // имя символаENUM_TIMEFRAMES timeframe, // периодdatetime start_time, // с какой датыint count, // сколько копируемdouble high_array[] // массив для копирования максимальных цен
);
Do I have to warp an array to get one value?
+ One more question: for example if i set the hour chart to 19:20 it will give me a high bar that opened at 19:00\and i don't get anything at all\and i get a high bar that opened at 20:00 ?
Here, I really don't get it. It's not like that either.
structMqlTradeRequest
{
request. action=TRADE_ACTION_DEAL; // Тип выполняемого действия
request. volume=1; // Запрашиваемый объем сделки в лотах
request. type=ORDER_TYPE_SELL; // Тип ордераOrderSend(request,result);
}
'MqlTradeRequest' - struct or class already defined deposit.mq5 20 9
And this is not the case.
structMqlTradeRequest
{
request. action=TRADE_ACTION_DEAL; // Тип выполняемого действия
request. volume=1; // Запрашиваемый объем сделки в лотах
request. type=ORDER_TYPE_SELL; // Тип ордера
}
OrderSend(request,result);
//---
'MqlTradeRequest' - struct or class already defined deposit.mq5 20 9
I would assume that if stops-profits are not specified, then they don't exist, if a currency pair is not specified, then it is the one on whose chart the robot is, the price of a nimble order according to my intellect also doesn't seem to be necessary! I read English. I am guessing.
And what class is not defined in this structure? The compiler has got stuck in its brain!
AAH! The structure is already defined! It compiled!!!
Print ( ACCOUNT_BALANCE );
Print (SYMBOL_MARGIN_INITIAL);//Начальная (инициирующая) маржа обозначает размер необходимых залоговых средств в маржинальной валюте для открытия позиции объемом в один лот. Используется при проверке средств клиента при входе в рынок.
Got 37 and 42 !!!!!. What's thirty-seven? What's forty-two? I see a balance of 17 155, 43 and what are those numbers?
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.
Can anyone suggest how to get (catch) the moment when a position is closed in MT5? Actually, you need to get the properties of the last closed position.
I'm switching from MQL4, I cannot understand how to find high and low bar using time+TF. It simply means shift by time and high and low by shifft.
---------------------------------------------------------------
it looks like CopyHigh etc.
Do I have to warp an array to get one value?
+ One more question: for example if i set the hour chart to 19:20 it will give me a high bar that opened at 19:00\and i don't get anything at all\and i get a high bar that opened at 20:00 ?
'MqlTradeRequest' - struct or class already defined deposit.mq5 20 9
And this is not the case.
'MqlTradeRequest' - struct or class already defined deposit.mq5 20 9
I would assume that if stops-profits are not specified, then they don't exist, if a currency pair is not specified, then it is the one on whose chart the robot is, the price of a nimble order according to my intellect also doesn't seem to be necessary! I read English. I am guessing.
And what class is not defined in this structure? The compiler has got stuck in its brain!
AAH! The structure is already defined! It compiled!!!
You know, put in 37 and 42 !!!!! What's thirty-seven? What's forty-two? I see a balance of 17,155, 57 and what are those numbers?
You know, I put in 37 and 42 !!!!! What is thirty-seven? What's forty-two? I see a balance of 17 155, 43 and what are these numbers?
ACCOUNT_BALANCE is a numeric identifier
correct isAccountInfoDouble(ACCOUNT_BALANCE) andSymbolInfoDouble( Symbol(),SYMBOL_MARGIN_INITIAL)
in other words, the identifier can be represented both alphabetic and numeric
in other words ACCOUNT_BALANCE andSYMBOL_MARGIN_INITIAL are simply numbers