当前位置: 首页>>代码示例>>C#>>正文


C# TradeType.ToString方法代码示例

本文整理汇总了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");
        }
开发者ID:redrhino,项目名称:cAlgo.Base,代码行数:10,代码来源:PayBackII.cs

示例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");
        }
开发者ID:Mikai47,项目名称:cAlgoBot,代码行数:9,代码来源:PayBack+II.cs

示例3: Trade

 internal Trade(double price, double amount, TradeType type)
 {
     this.price = price.ToString();
     this.amount = amount.ToString();
     this.type = type.ToString().ToLower();
 }
开发者ID:rarach,项目名称:exchange-bots,代码行数:6,代码来源:Trade.cs

示例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());
        }
开发者ID:eithery,项目名称:core,代码行数:10,代码来源:SimpleDictionaryItemTest.cs


注:本文中的TradeType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。