Hello
Is there a command I can use to cancel all orders or limit orders ive send to my broker?
cancel order
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: cancel order
Where do you want to use this command?Hello
Is there a command I can use to cancel all orders or limit orders ive send to my broker?
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.
Re: cancel order
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....
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....
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: cancel order
what is your symbol?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 chart resolution?
what is your session time?
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: cancel order
try this: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....
Code: Select all
if time < 1415 then
begin
{----- put your trading logic here -----}
end;
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: cancel order
For non-IOG strategies: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
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 will 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, and the condition is no longer met, the order will expire. (ie it will be automatically cancelled).
If the condition of the order still stands, the order will remain until it no longer meets the trading criteria.
Re: cancel order
I read the response of TJ. Is it correct that this does not apply to a STP LMT order in the same way? When I sent a STP LMT order and I revise it at the beginning of the next bar (because my buyprice calculation has changed) I recieve an error message from IB: "Order rejected - reason: Stop price revision is disallowed after order has triggered."