Code: Select all
using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
using ATCenterProxy.interop;
namespace PowerLanguage.Strategy
{
public class SL : SignalObject
{
private IOrderPriced sellToEnter;
public SL(object _ctx):base(_ctx)
{
}
protected override void Create()
{
this.sellToEnter = OrderCreator.Stop(
new SOrderParameters(Contracts.Default, "EnterShort", EOrderAction.SellShort));
}
protected override void CalcBar()
{
this.sellToEnter.Send(170.23);
this.GenerateExitOnClose();
this.GenerateStopLossPt(40);
}
}
}
However, if the signal is placed on a 60min chart, then the signal correctly hits the stop loss.
I have submitted this to the bug tracker https://www.multicharts.com/pm/public/m ... es/MC-2644.
Please let me know if this usage isn't correct and it this isn't a bug.