Поиск
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Timers;
using System.Threading;
using XlDde;namespace ConsoleApplication2
{
class Program
{
const string service = «myDDE»;
const string candleSPOT = «SPOT»;
static void Main(string[] args)
{
using (XlDdeServer server = new XlDdeServer(service))
{
server.AddChannel(candleSPOT, new SPOTChannel());
server.Register();Console.WriteLine(«DDE server ready. Press Enter to exit.\n\n»);
Console.ReadLine();
}
}
}
// **********************************************************************
// * Классы DDE каналов с обработчиками данных *
// **********************************************************************
class SPOTChannel: XlDdeChannel
{
//static int time2 = 1000;
static int em = 7;
static int m = 1200;
static int[] NM = new int[em];
static int NMM = 0;
static int LastMinute = 0;
static int mm = 1638400;
static double[] Price_trade = new double[mm];
string[] EM_trade = new string[mm];
static int[] Time_trade_I = new int[mm];
static int[] Volume_trade = new int[mm];
static int[,] Time = new int[em,m];
static double[,] O = new double[em,m];
static double[,] H = new double[em,m];
static double[,] L = new double[em,m];
static double[,] C = new double[em,m];
static double[,] V = new double[em,m];
protected override void ProcessTable(XlTable xt)
{
//int time3 = 1000;
int[] nach = new int[em];
int nach1 = 0;
int i = 0;
int j = 0;
int s = 0;
int curHour = 0;
int curMin = 0;
int curDay = 0;
int curSec = 0;
int curDay_1 = 0;
string name;
string[] bf;
string[] EM = new string[em];
DateTime moment;
string[] Time_trade = new string[mm];