TIF, stop orders, ...

Questions about MultiCharts .NET and user contributed studies.
Posts: 3
Joined: 01 Feb 2011
Has thanked: 3 times

TIF, stop orders, ...

Postby sam028 » 17 Oct 2012

Maybe a silly question, but as I'm a bit stuck with it...

I have something like this:

Code: Select all

protected override void Create() {
            buy_stop   = OrderCreator.Stop(new SOrderParameters(Contracts.Default, "Buy Stop", EOrderAction.Buy , OrderExit.FromAll));

protected override void CalcBar(){
if (my condition == true) {
  buy_stop.Send(MyStopPrice, 1);

But this order seems to be valid only during this bar.
So, how to keep this stop order alive, let's say with GTC as its TIF ?


User avatar
Henry MultiСharts
Posts: 8667
Joined: 25 Aug 2011
Has thanked: 1218 times
Been thanked: 2792 times

Re: TIF, stop orders, ...

Postby Henry MultiСharts » 18 Oct 2012

Hello sam028,

All orders generated in auto trading live only until the end of the bar they were sent.
In order to keep the order active at the broker it should be generated on each bar.
In order to cancel the order you need to stop sending it.
These users thanked the author Henry MultiСharts for the post:

Return to “MultiCharts .NET”