cancel order

Questions about MultiCharts and user contributed studies.
HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

cancel order

Postby HummerH1 » 05 Nov 2011

Hello

Is there a command I can use to cancel all orders or limit orders ive send to my broker?

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: cancel order

Postby TJ » 05 Nov 2011

HummerH1 wrote:Hello

Is there a command I can use to cancel all orders or limit orders ive send to my broker?

Where do you want to use this command?

I assume you are looking for an EasyLanguage reserved word in a strategy and not a button to push in a panic while in manual chart trading.

In a strategy, when the condition is not met, you don't send the order.
If there is no order, there is nothing to be cancelled.

If you think your scenario MIGHT change intra-bar,
then use IntraBarOrderGeneration for your strategy.


To get a good foundation on creating strategies,
I would suggest you to read up on the ebook
The essential EasyLanguage programming guide

Another good book is
Getting Started with EasyLanguage
This book is not available anymore, but if you Google the web, you can still find a copy archived somewhere.

HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

Re: cancel order

Postby HummerH1 » 06 Nov 2011

Thanks
Ive read that.

Yes, it is in my strategies, using EL.

I'm sending limit orders to my broker.
Let say at 14:15 i close all my orders.

If the condition is not met until then, Id like to cancel it - so as if the condition is met after 14:15 it will not become an active order

When trading on a DOM window, there's a button doing that....

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: cancel order

Postby TJ » 06 Nov 2011

HummerH1 wrote:Thanks
Ive read that.

Yes, it is in my strategies, using EL.

I'm sending limit orders to my broker.
Let say at 14:15 i close all my orders.

If the condition is not met until then, Id like to cancel it - so as if the condition is met after 14:15 it will not become an active order

When trading on a DOM window, there's a button doing that....

what is your symbol?
what is your chart resolution?
what is your session time?

HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

Re: cancel order

Postby HummerH1 » 06 Nov 2011

how all this related?

My symbol: E mini S&P500
Session: CME combined
chart resolution 15 mins with intrabargeneration

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: cancel order

Postby TJ » 06 Nov 2011

HummerH1 wrote:Thanks
Ive read that.

Yes, it is in my strategies, using EL.

I'm sending limit orders to my broker.
Let say at 14:15 i close all my orders.

If the condition is not met until then, Id like to cancel it - so as if the condition is met after 14:15 it will not become an active order

When trading on a DOM window, there's a button doing that....

try this:

Code: Select all

if time < 1415 then
begin

     {----- put your trading logic here -----}

end;

HummerH1
Posts: 66
Joined: 13 Sep 2011
Has thanked: 6 times
Been thanked: 1 time

Re: cancel order

Postby HummerH1 » 06 Nov 2011

Thanks.
I have done that.

But if before 14:15 ive sent a limit order
and the price is reached after 14:15, the order will be executed.... and i want to cancel that

User avatar
TJ
Posts: 6553
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 966 times
Been thanked: 1893 times

Re: cancel order

Postby TJ » 06 Nov 2011

HummerH1 wrote:Thanks.
I have done that.

But if before 14:15 ive sent a limit order
and the price is reached after 14:15, the order will be executed.... and i want to cancel that


For non-IOG strategies:
Your order is only good for ONE bar.
MultiCharts evaluates your logic at the end of each bar.
If the condition meets your logic, the order is sent at the open of the next bar.
If the order is not filled at the end of next bar, and the condition is no longer met,
the order will expire. (ie. it be automatically cancelled).

For IOG strategies:
Your order is only good for ONE tick.
MultiCharts evaluates your logic every tick.
If the condition meets your logic, the order is sent at the next tick (intrabar).
If the order is not filled at the next tick, the order will expire. (ie it be automatically cancelled).
These users thanked the author TJ for the post (total 2):
HummerH1JoshM


Return to “MultiCharts”