本文整理汇总了C#中Business.LogRequestSuper方法的典型用法代码示例。如果您正苦于以下问题:C# Business.LogRequestSuper方法的具体用法?C# Business.LogRequestSuper怎么用?C# Business.LogRequestSuper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Business
的用法示例。
在下文中一共展示了Business.LogRequestSuper方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AutoSuperDealerOpen
/// <summary>
///
/// </summary>
/// <param name="command"></param>
/// <param name="digits"></param>
internal void AutoSuperDealerOpen(Business.RequestDealer command, int digits)
{
ProcessQuoteLibrary.Business.BarTick barBid = new ProcessQuoteLibrary.Business.BarTick();
barBid = this.GetCandlesTwoM(command.Request.Symbol.Name);
barBid.High = Math.Round(barBid.High, digits);
barBid.Low = Math.Round(barBid.Low, digits);
barBid.HighAsk = Math.Round(barBid.HighAsk, digits);
barBid.LowAsk = Math.Round(barBid.LowAsk, digits);
//double spreadDifference = command.Request.Symbol.SpreadDifference;
double spreadDifference = command.Request.SpreaDifferenceInOpenTrade;
double spreadDefault = 0;
for (int i = command.Request.Symbol.ParameterItems.Count - 1; i >= 0; i--)
{
if (command.Request.Symbol.ParameterItems[i].Code == "S013")
{
double.TryParse(command.Request.Symbol.ParameterItems[i].NumValue, out spreadDefault);
break;
}
}
int type = Business.Symbol.ConvertCommandIsBuySell(command.Request.Type.ID);
if (type == 1)
{
ProcessQuoteLibrary.Business.BarTick barAsk = new ProcessQuoteLibrary.Business.BarTick();
barAsk = barBid;
double spreadDiff = Business.Symbol.ConvertNumberPip(digits, spreadDifference);
double spreadDef = Business.Symbol.ConvertNumberPip(digits, spreadDefault);
if (command.Request.Symbol.ApplySpread)
{
double high = (double)barBid.High + (double)spreadDiff + (double)spreadDef;
barAsk.High = Math.Round(high, digits);
double low = (double)barBid.Low + (double)spreadDiff + (double)spreadDef;
barAsk.Low = Math.Round(low, digits);
}
else
{
double high = (double)barBid.HighAsk + (double)spreadDiff;
barAsk.High = Math.Round(high, digits);
double low = (double)barBid.LowAsk + (double)spreadDiff;
barAsk.Low = Math.Round(low, digits);
}
if (barAsk.High >= command.Request.OpenPrice && command.Request.OpenPrice >= barAsk.Low)
{
command.FlagConfirm = true;
command.Notice = "RD03";
//this.AddRequestDealerToInvestor(command);
command.Request.Symbol.MarketAreaRef.AddCommand(command.Request);
command.AgentCode = "system";
command.Answer = "Confirm";
TradingServer.Facade.FacadeSendNoticeManagerDealerRequest(command);
return;
}
else
{
command.FlagConfirm = false;
command.Notice = "RD04";
this.AddRequestDealerToInvestor(command);
command.AgentCode = "system";
command.Answer = "Requote";
TradingServer.Facade.FacadeSendNoticeManagerDealerRequest(command);
TradingServer.Facade.FacadeAddNewSystemLog(3, "'" + command.Request.Investor.Code + "': system requote " + command.LogRequestSuper(barAsk.Low, barAsk.High), "Requote", "", "system");
return;
}
}
else if (type == 2)
{
if (barBid.Low <= command.Request.OpenPrice && command.Request.OpenPrice <= barBid.High)
{
command.FlagConfirm = true;
command.Notice = "RD06";
//this.AddRequestDealerToInvestor(command);
command.Request.Symbol.MarketAreaRef.AddCommand(command.Request);
command.AgentCode = "system";
command.Answer = "Confirm";
TradingServer.Facade.FacadeSendNoticeManagerDealerRequest(command);
return;
}
else
{
command.FlagConfirm = false;
command.Notice = "RD07";
this.AddRequestDealerToInvestor(command);
command.AgentCode = "system";
command.Answer = "Requote";
TradingServer.Facade.FacadeSendNoticeManagerDealerRequest(command);
TradingServer.Facade.FacadeAddNewSystemLog(3, "'" + command.Request.Investor.Code + "': system requote " + command.LogRequestSuper(barBid.Low, barBid.High), "Requote", "", "system");
return;
}
}
}