zoukankan      html  css  js  c++  java
  • 美版MC 使用

    备份

    C:ProgramDataTS SupportMultiCharts .NETStudyServerTechniquesCS

    pledit 无法打开 解决方法

    regedit 

    hkey_current_usersoftware 下面删除 ts support  文件夹 

    直接使用 VS2010 进行 开发 。 

    安装 VS2010  可以直接使用C:ProgramDataTS SupportMultiCharts .NETStudyServerTechniquesCSPLStudies2010.sln 开发 。 注意模板  

    1、使用序列的function  

    //-------------------------------

     HTTP.Function.cs

    using System;

    using System.Drawing;

    using System.Linq;

    namespace PowerLanguage

    {

    namespace Function

    {

    public sealed class HTTP : FunctionSeries<System.Double>

    {

    public aaa(CStudyControl _master) : base(_master) { }

    public aaa(CStudyControl _master, int _ds) : base(_master, _ds) { }

    protected override void Create()

    {

    // create variable objects and function objects

    }

    protected override void StartCalc()

    {

    // assign inputs

    }

    protected override System.Double CalcBar()

    {

    // function logic

    return default(System.Double);

    }

    }

    }

    }

    //-------------------------------

    2、指标模板

    //-------------------------------

    bbb.Indicator.cs

    using System;

    using System.Drawing;

    using System.Linq;

    using PowerLanguage.Function;

    namespace PowerLanguage.Indicator{

    public class bbb : IndicatorObject {

    public bbb(object _ctx):base(_ctx){}

    private IPlotObject plot1;

    protected override void Create() {

    // create variable objects, function objects, plot objects etc.

    plot1 = AddPlot(new PlotAttributes("", EPlotShapes.Line, Color.Red));

    }

    protected override void StartCalc() {

    // assign inputs 

    }

    protected override void CalcBar(){

    // indicator logic 

    plot1.Set(Bars.Close[0]);

    }

    }

    }

    //-------------------------------

    3、信号模板

    //-------------------------------

     ccc.Strategy.cs

    using System;

    using System.Drawing;

    using System.Linq;

    using PowerLanguage.Function;

    using ATCenterProxy.interop;

    namespace PowerLanguage.Strategy {

    public class ccc : SignalObject {

    public ccc(object _ctx):base(_ctx){}

    private IOrderMarket buy_order;

    protected override void Create() {

    // create variable objects, function objects, order objects etc.

    buy_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, EOrderAction.Buy));

    }

    protected override void StartCalc() {

    // assign inputs 

    }

    protected override void CalcBar(){

    // strategy logic 

    buy_order.Send();

    }

    }

    }

    //———————————————----------------

    获取 当前订单数量 

    int x = Positions[0].OpenTrades.Count;

     
    获取 最近 最高价  最低价 

    HighestFC highest;

    highest = new HighestFC(this);

    highest.len = 50;

                highest.pricevalue = Bars.High;

     

     引用DLL

    • For C# dll you need to add a reference in PowerLanguage .Net Editor (Right click on the workarea with the code in PowerLanguage .Net Editor->References-> Add reference/Add global reference).

    • For C++ dll you need to reference the functions that are provided by this dll for ex:
       
      [DllImport( "mTestMCdll.dll", CharSet = CharSet.Unicode )]
      public static extern void CreateGPanelHDCHWND( IntPtr hdc, IntPtr hwnd );

     二图表 的相关数据

    BarsOfData(2).Close

    二图表的 指标  ADX _a = new ADX(this,2);

     定义 introbar  

    [IOGMode(IOGMode.Enabled)]

  • 相关阅读:
    初始JSON
    JS异步加载的三种方式
    JS之事件
    关于null == 0?返回false的问题
    JS之类型转换
    金融(一)
    使用var声明的变量 和 直接赋值并未声明的变量的区别
    POJ2594 Treasure Exploration
    POJ1422 Air Raid
    Codevs1922 骑士共存问题
  • 原文地址:https://www.cnblogs.com/aliblogs/p/5493810.html
Copyright © 2011-2022 走看看