пятница, 11 октября 2019 г.
суббота, 28 сентября 2019 г.
Moex Usefull References
Индикативные курсы валюты
Instrument Specidication
https://www.moex.com/ru/derivatives/currency-rate.aspx
https://www.moex.com/export/derivatives/currency-rate.aspx?language=ru¤cy=CAD/RUB&moment_start=2019-08-28&moment_end=2019-09-28
WebRequests ISSInstrument Specidication
https://iss.moex.com/iss/engines/futures/markets/forts/securities/SiZ9.xml
https://iss.moex.com/iss/engines/futures/markets/options/securities/Si64500BI9D.xml
https://iss.moex.com/iss/engines/futures/markets/options/securities/Si64500BU9D.xml
Trade Results
Bars ISS
http://iss.moex.com/iss/engines/futures/markets/forts/boards/RFUD/securities/SiZ9/candles.csv?from=2019-09-01&till=2019-09-30&interval=1&start=0
http://iss.moex.com/iss/engines/futures/markets/forts/boards/RFUD/securities/SiZ9/candles.json?from=2019-09-01&till=2019-09-30&interval=1&start=0
http://iss.moex.com/iss/engines/futures/markets/forts/boards/RFUD/securities/SiZ9/candles.xml?from=2019-09-01&till=2019-09-30&interval=1&start=0
http://iss.moex.com/iss/engines/futures/markets/forts/boards/RFUD/securities/SiZ9/candles.json?from=2019-09-01&till=2019-09-30&interval=1&start=0
http://iss.moex.com/iss/engines/futures/markets/forts/boards/RFUD/securities/SiZ9/candles.xml?from=2019-09-01&till=2019-09-30&interval=1&start=0
понедельник, 23 сентября 2019 г.
Updates GS.Trade
Strategy:
Z007:
CloseAll -> new SetOrder2
TimeHandler: Start_MorningSession: MorningSessionStartPrefix(); together with StartNewDayInit()
Z007:
CloseAll -> new SetOrder2
TimeHandler: Start_MorningSession: MorningSessionStartPrefix(); together with StartNewDayInit()
воскресенье, 15 сентября 2019 г.
Moex shut down, Transaction Reply Code, Important
19.09.13
https://www.moex.com/n25015/?nt=101
Transactions:
[GW][4018] - Администратор ... - проблемы на Moex, а не у Сервера Quik
ReplyCode = 4
https://www.moex.com/n25015/?nt=101
Transactions:
[GW][4018] - Администратор ... - проблемы на Moex, а не у Сервера Quik
ReplyCode = 4
воскресенье, 8 сентября 2019 г.
GS.Trade.TradeTerminals
Updates in Strategies
SendTransactions,
ClearTransactions
1. OrderQueue2.cs
Clear All Queue
(Rejected only Transaction with SetOrder.
And Remove this Orders)
TransactionsReply:
File: QuikTradeTerminal.cs
Last Handler: TransactionReplyResolve(IEventArgs1 args)
Requirements Specification in Brief
1. NotConnecton:
{
TradeTerminal: Clear All TransactionQueue
Strategy: ActiveOrdersCollection:
1. Remove Orders.Where(o=>o.TransactionOperation == SetOrder)
if(TransactionStatus == NotConnected)
OrderStatus = REJECTED and then will be REMOVED
Natural Delae after NotConnected: After TimeIntTime Strategy will Register new Order in NEW MARKET CONDITIONS AFTER CONNECTION RESTORE
2. Remain NoSended.Orders.ActiveOrders.Where(o=>o.TransactionOperation == CancelOrder);
ReTryToCancelActiveOrders in MainBase Cycle.
3.ReSend Order Registered only after Cancel all Previouse Orders.
After NotConnected need new Order in new Market conditions.
}
MainBase()
{
EventHub?.DeQueueProcess();
// Filled, Canceled, Rejected, NotSent
RemoveClosedOrders();
ReTryToCancelActiveOrders();
RemoveOrdersSendedTimeOut(DateTime.Now) = 5 minutes;
Main();
}
Total:
1. Удалены все Filled, Cancel, NosSended( Rejected) RemoveClosedOrders();
2. Все Активные ордера, требующие отмены, если не было Коннекта,
пытаются в Main ReTryToCancelActiveOrders();
19.09.15
EventHub?.DeQueueProcess();
// Remove Filled, Canceled, Rejected, NotSent
RemoveClosedOrders();
// Remove OrdersRegisteredReadyToUse When No Connection
RemoveRegisteredWhenNoConnection(string.Empty);
RemoveOrdersSendedTimeOut(DateTime.Now);
// ReTry Cancel ActiveOrdersSoftReadyToUse which Not Seneded
ReTryToCancelActiveOrders();
// ReTry SetOrder2 for RegisteredReadyToUse in AciveOrderCollection (PocketOrder Implementation)
TryToSetOrderRegisteredPending();
ClearTransactions
1. OrderQueue2.cs
Clear All Queue
(Rejected only Transaction with SetOrder.
And Remove this Orders)
TransactionsReply:
File: QuikTradeTerminal.cs
Last Handler: TransactionReplyResolve(IEventArgs1 args)
Requirements Specification in Brief
1. NotConnecton:
{
TradeTerminal: Clear All TransactionQueue
Strategy: ActiveOrdersCollection:
1. Remove Orders.Where(o=>o.TransactionOperation == SetOrder)
if(TransactionStatus == NotConnected)
OrderStatus = REJECTED and then will be REMOVED
Natural Delae after NotConnected: After TimeIntTime Strategy will Register new Order in NEW MARKET CONDITIONS AFTER CONNECTION RESTORE
2. Remain NoSended.Orders.ActiveOrders.Where(o=>o.TransactionOperation == CancelOrder);
ReTryToCancelActiveOrders in MainBase Cycle.
3.ReSend Order Registered only after Cancel all Previouse Orders.
After NotConnected need new Order in new Market conditions.
}
MainBase()
{
EventHub?.DeQueueProcess();
// Filled, Canceled, Rejected, NotSent
RemoveClosedOrders();
ReTryToCancelActiveOrders();
RemoveOrdersSendedTimeOut(DateTime.Now) = 5 minutes;
Main();
}
Total:
1. Удалены все Filled, Cancel, NosSended( Rejected) RemoveClosedOrders();
2. Все Активные ордера, требующие отмены, если не было Коннекта,
пытаются в Main ReTryToCancelActiveOrders();
19.09.15
EventHub?.DeQueueProcess();
// Remove Filled, Canceled, Rejected, NotSent
RemoveClosedOrders();
// Remove OrdersRegisteredReadyToUse When No Connection
RemoveRegisteredWhenNoConnection(string.Empty);
RemoveOrdersSendedTimeOut(DateTime.Now);
// ReTry Cancel ActiveOrdersSoftReadyToUse which Not Seneded
ReTryToCancelActiveOrders();
// ReTry SetOrder2 for RegisteredReadyToUse in AciveOrderCollection (PocketOrder Implementation)
TryToSetOrderRegisteredPending();
пятница, 30 августа 2019 г.
вторник, 27 августа 2019 г.
Process in TradeTerminals on the ProcessTask
ProcessTask:
public sealed partial class QuikTradeTerminal
{
public bool IsProcessTaskInUse { get; set; }
[XmlIgnore]
public ProcessTask<IEventArgs1> ProcessTask { get; private set; }
private void SetupProcessTask()
{
if (!IsProcessTaskInUse)
{
Evlm2(EvlResult.WARNING, EvlSubject.TECHNOLOGY, ParentName, Name,
MethodBase.GetCurrentMethod().Name, "ProcessTask Will NOT BE USED",
ToString());
return;
}
ProcessTask = new ProcessTask<IEventArgs1>
{
Parent = this,
TimeInterval = 1000,
IsEveryItemPushProcessing = true,
ItemProcessingAction = ItemProcessingAction,
IdlingCycleAction = ProcessTaskIdleAction
};
ProcessTask.Init();
Evlm2(EvlResult.SUCCESS, EvlSubject.TECHNOLOGY, ParentName, Name,
MethodBase.GetCurrentMethod().Name, "ProcessTask IS USED NOW",
ProcessTask?.ToString());
}
public void Start()
{
SetupProcessTask();
if(IsProcessTaskInUse)
ProcessTask?.Start();
}
public void Stop()
{
if (IsProcessTaskInUse)
ProcessTask?.Stop();
}
// ************************************************
// ProcessTask Actions
private void ItemProcessingAction(IEventArgs1 args)
{
try
{
args.ProcessingAction(args);
}
catch (Exception e)
{
SendException(e);
}
}
// AdditionalWorks in IdlingCycleAction
private void ProcessTaskIdleAction()
{
TradeResolveProcess2();
OrderResolveProcess();
}
}
Process in TradeTerminal to linear Execution:
1. SendTransaction From Queue:
public void SendTransaction(IQuikTransaction t)
{
if (t == null)
return;
if (IsProcessTaskInUse)
{
var eargs = new EventArgs1
{
Process = "QuikTransactionsProcess",
Category = "QuikTransactions",
Entity = "TransactionSend",
Operation = "AddOrUpdate",
Object = t,
ProcessingAction = SendTransactionFromQueue
};
ProcessTask?.EnQueue(eargs);
}
else
TransactionQueue.Push(t);
}
2. Clear Transactions From Queue when Terminal is NOT_CONNECTED
public void ClearTransactionFromQueue()
{
if (IsProcessTaskInUse)
{
var eargs = new EventArgs1
{
Process = "QuikTransactionsProcess",
Category = "QuikTransactions",
Entity = "TransactionClear",
Operation = "AddOrUpdate",
ProcessingAction = ClearOrderTransactionQueue3
};
ProcessTask?.EnQueue(eargs);
}
else
ClearOrderTransactionQueue3(null);
}
public sealed partial class QuikTradeTerminal
{
public bool IsProcessTaskInUse { get; set; }
[XmlIgnore]
public ProcessTask<IEventArgs1> ProcessTask { get; private set; }
private void SetupProcessTask()
{
if (!IsProcessTaskInUse)
{
Evlm2(EvlResult.WARNING, EvlSubject.TECHNOLOGY, ParentName, Name,
MethodBase.GetCurrentMethod().Name, "ProcessTask Will NOT BE USED",
ToString());
return;
}
ProcessTask = new ProcessTask<IEventArgs1>
{
Parent = this,
TimeInterval = 1000,
IsEveryItemPushProcessing = true,
ItemProcessingAction = ItemProcessingAction,
IdlingCycleAction = ProcessTaskIdleAction
};
ProcessTask.Init();
Evlm2(EvlResult.SUCCESS, EvlSubject.TECHNOLOGY, ParentName, Name,
MethodBase.GetCurrentMethod().Name, "ProcessTask IS USED NOW",
ProcessTask?.ToString());
}
public void Start()
{
SetupProcessTask();
if(IsProcessTaskInUse)
ProcessTask?.Start();
}
public void Stop()
{
if (IsProcessTaskInUse)
ProcessTask?.Stop();
}
// ************************************************
// ProcessTask Actions
private void ItemProcessingAction(IEventArgs1 args)
{
try
{
args.ProcessingAction(args);
}
catch (Exception e)
{
SendException(e);
}
}
// AdditionalWorks in IdlingCycleAction
private void ProcessTaskIdleAction()
{
TradeResolveProcess2();
OrderResolveProcess();
}
}
Process in TradeTerminal to linear Execution:
1. SendTransaction From Queue:
public void SendTransaction(IQuikTransaction t)
{
if (t == null)
return;
if (IsProcessTaskInUse)
{
var eargs = new EventArgs1
{
Process = "QuikTransactionsProcess",
Category = "QuikTransactions",
Entity = "TransactionSend",
Operation = "AddOrUpdate",
Object = t,
ProcessingAction = SendTransactionFromQueue
};
ProcessTask?.EnQueue(eargs);
}
else
TransactionQueue.Push(t);
}
2. Clear Transactions From Queue when Terminal is NOT_CONNECTED
public void ClearTransactionFromQueue()
{
if (IsProcessTaskInUse)
{
var eargs = new EventArgs1
{
Process = "QuikTransactionsProcess",
Category = "QuikTransactions",
Entity = "TransactionClear",
Operation = "AddOrUpdate",
ProcessingAction = ClearOrderTransactionQueue3
};
ProcessTask?.EnQueue(eargs);
}
else
ClearOrderTransactionQueue3(null);
}
Подписаться на:
Сообщения (Atom)

