send limit order  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
darob
Posts: 207
Joined: 20 Nov 2014
Has thanked: 57 times
Been thanked: 32 times

send limit order

Postby darob » 16 Jul 2016

Continuing my neverending project of automizing..

How do you get MC to send a limit order and leave it there? I don't care when in the session the price is struck, but at the moment MC ignores it if isn't the next bar. What do I need to do?

I have:

private IorderPriced buy_order;

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

StartCalc()
startTime = ...
endTime = ...

CalcBar()
...strategy...
buy_order.Send(Bars.Low[0]);

Much appreciate any help, thanks.

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: send limit order  [SOLVED]

Postby ABC » 17 Jul 2016

darob,

you send the order using Bars.Low[0]. This will result in a cancellation or adjustment of the limit price every time the low of the current bar changes.
When you want the limit order to keep a certain price, save that price into a variable (and don't update that variable after you saved your price) and use it as limit price for the order. This would send the limit order at the price you specified and keep it there.

Regards,

ABC

darob
Posts: 207
Joined: 20 Nov 2014
Has thanked: 57 times
Been thanked: 32 times

Re: send limit order

Postby darob » 18 Jul 2016

Thanks for putting me on track. I'm surprised there's no supplied MC script for such a basic trading idea, although it could be there and I'm not seeing it.

Regards


Return to “MultiCharts .NET”