mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-16 12:18:09 +00:00
Issue #95: Added default constructors to classes MqlBookInfo, MqlTradeCheckResult
This commit is contained in:
@@ -10,13 +10,16 @@ namespace MtApi5
|
|||||||
this.volume = volume;
|
this.volume = volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ENUM_BOOK_TYPE type { get; } // Order type from ENUM_BOOK_TYPE enumeration
|
public MqlBookInfo()
|
||||||
public double price { get; } // Price
|
{ }
|
||||||
public long volume { get; } // Volume
|
|
||||||
|
public ENUM_BOOK_TYPE type { get; set; } // Order type from ENUM_BOOK_TYPE enumeration
|
||||||
|
public double price { get; set; } // Price
|
||||||
|
public long volume { get; set; } // Volume
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{type}|{price}|{volume}";
|
return $"type = {type}; price = {price}; volume = {volume}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ namespace MtApi5
|
|||||||
{
|
{
|
||||||
public class MqlTradeCheckResult
|
public class MqlTradeCheckResult
|
||||||
{
|
{
|
||||||
public uint Retcode { get; } // Reply code
|
public uint Retcode { get; set; } // Reply code
|
||||||
public double Balance { get; } // Balance after the execution of the deal
|
public double Balance { get; set; } // Balance after the execution of the deal
|
||||||
public double Equity { get; } // Equity after the execution of the deal
|
public double Equity { get; set; } // Equity after the execution of the deal
|
||||||
public double Profit { get; } // Floating profit
|
public double Profit { get; set; } // Floating profit
|
||||||
public double Margin { get; } // Margin requirements
|
public double Margin { get; set; } // Margin requirements
|
||||||
public double Margin_free { get; } // Free margin
|
public double Margin_free { get; set; } // Free margin
|
||||||
public double Margin_level { get; } // Margin level
|
public double Margin_level { get; set; } // Margin level
|
||||||
public string Comment { get; } // Comment to the reply code (description of the error)
|
public string Comment { get; set; } // Comment to the reply code (description of the error)
|
||||||
|
|
||||||
public MqlTradeCheckResult(uint retcode
|
public MqlTradeCheckResult(uint retcode
|
||||||
, double balance
|
, double balance
|
||||||
@@ -32,6 +32,9 @@ namespace MtApi5
|
|||||||
Comment = comment;
|
Comment = comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MqlTradeCheckResult()
|
||||||
|
{ }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"Retcode={Retcode}; Comment={Comment}; Balance={Balance}; Equity={Equity}; Profit={Profit}; Margin={Margin}; Margin_free={Margin_free}; Margin_level={Margin_level}";
|
return $"Retcode={Retcode}; Comment={Comment}; Balance={Balance}; Equity={Equity}; Profit={Profit}; Margin={Margin}; Margin_free={Margin_free}; Margin_level={Margin_level}";
|
||||||
|
|||||||
Reference in New Issue
Block a user