Using HighD in signal

Questions about MultiCharts .NET and user contributed studies.
jules190
Posts: 20
Joined: 06 Aug 2014
Been thanked: 4 times

Using HighD in signal

Postby jules190 » 26 Mar 2020

Hi, I don't appear to be able to use HighD in a signal. The code below, outputs the correct value to the console, however when I uncomment buyToEnter.Send(highD[0]) it messes up the values. The value printed to the console becomes the high of the second bar of the current day.

Is this a bug? Or is this usage not correct?

Code: Select all

using System; using System.Drawing; using System.Linq; using PowerLanguage.Function; using ATCenterProxy.interop; namespace PowerLanguage.Strategy { public class highDTest : SignalObject { private IOrderPriced buyToEnter; public highDTest(object _ctx):base(_ctx){} private HighD highD; protected override void Create() { highD = new HighD(this); buyToEnter = OrderCreator.Limit( new SOrderParameters(Contracts.Default, "EnterLong", EOrderAction.Buy)); } protected override void StartCalc() { highD.periodsago = 1; } protected override void CalcBar() { Output.WriteLine(Bars.Time[0].ToString()); Output.WriteLine(highD[0].ToString()); //buyToEnter.Send(highD[0]); } } }

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Using HighD in signal

Postby Svetlana MultiCharts » 30 Mar 2020

Hello jules190,

We have forwarded the issue to our dev team. They will work on it to include the fix in one of the future MultiCharts versions.


Return to “MultiCharts .NET”