本文整理汇总了C#中TradeType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# TradeType.ToString方法的具体用法?C# TradeType.ToString怎么用?C# TradeType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TradeType
的用法示例。
在下文中一共展示了TradeType.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: manageOpen
private void manageOpen(TradeType tradeType, long volume, string prefixLabel = botLabel)
{
int nVolumePartition = 10, part1 = 5, part2 = 3;
long nVol = (long)Math.Floor((double)(volume / (microVolume * nVolumePartition)));
long partialVolume = nVol * microVolume;
var result1 = ExecuteMarketOrder(tradeType, Symbol, partialVolume * part1, prefixLabel + tradeType.ToString() + "-1");
var result2 = ExecuteMarketOrder(tradeType, Symbol, partialVolume * part2, prefixLabel + tradeType.ToString() + "-2");
var result3 = ExecuteMarketOrder(tradeType, Symbol, volume - (part1 + part2) * partialVolume, prefixLabel + tradeType.ToString() + "-3");
}
示例2: manageOpen
private void manageOpen(TradeType tradeType, long volume, string prefixLabel = botLabel)
{
int parties = 10, part1 = 5, part2 = 3;
long partialVolume = Symbol.NormalizeVolume(volume / parties, RoundingMode.ToNearest);
var result1 = ExecuteMarketOrder(tradeType, Symbol, partialVolume * part1, prefixLabel + tradeType.ToString() + "-1");
var result2 = ExecuteMarketOrder(tradeType, Symbol, partialVolume * part2, prefixLabel + tradeType.ToString() + "-2");
var result3 = ExecuteMarketOrder(tradeType, Symbol, volume - (part1 + part2) * partialVolume, prefixLabel + tradeType.ToString() + "-3");
}
示例3: Trade
internal Trade(double price, double amount, TradeType type)
{
this.price = price.ToString();
this.amount = amount.ToString();
this.type = type.ToString().ToLower();
}
示例4: TestToString
public void TestToString()
{
Assert.AreEqual("Trailer (TR)", new TradeType { Code = "TR", Name = "Trailer" }.ToString());
Assert.AreEqual("Buy (B)", new TradeType { Code = "\r B\n\r", Name = "\t Buy\t\n\r" }.ToString());
Assert.AreEqual("Surrender", new TradeType { Name = "Surrender" }.ToString());
Assert.AreEqual("BUY", new TradeType { Code = "BUY" }.ToString());
var tradeType = new TradeType { Name = " " };
Assert.AreEqual("TradeType (Id: '{0}')".Form(tradeType.Id.ToString()), tradeType.ToString());
}