NexusFi: Find Your Edge


Home Menu

 





EasyLanguage, Mulitcharts and Limit Orders


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one nismo with 6 posts (3 thanks)
    2. looks_two guppy with 6 posts (0 thanks)
    3. looks_3 Nicolas11 with 5 posts (4 thanks)
    4. looks_4 Big Mike with 5 posts (10 thanks)
      Best Posters
    1. looks_one RM99 with 2.5 thanks per post
    2. looks_two Big Mike with 2 thanks per post
    3. looks_3 Nicolas11 with 0.8 thanks per post
    4. looks_4 nismo with 0.5 thanks per post
    1. trending_up 24,678 views
    2. thumb_up 22 thanks given
    3. group 8 followers
    1. forum 28 posts
    2. attach_file 4 attachments




 
Search this Thread

EasyLanguage, Mulitcharts and Limit Orders

(login for full post details)
  #1 (permalink)
nismo
Australia
 
Posts: 32 since Dec 2010
Thanks Given: 7
Thanks Received: 3

I normally use market orders and would like to try limit orders and have a few questions.

1. How do you cancel a limit order after a certain amount of time if it has not been executed (I see there is an option to convert to a market order after a set time but I just want to cancel the order)?

2. When I replace market order with limit order is it best to do a limit order + 1-2 pips? My thinking is that by the time the order gets sent the price may have moved past the price at which the order was generated at?

3. Is there any 'best practises' when using limit orders?

My main reason for wanting to try limit orders is due to slippage. Would be nice if there was an order type that said by at market but no worse than 1-5pips......

Cheers,

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
ISO Equity Curve Indicator
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Volume profile TradeStation
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
36 thanks
Deaddogs Stock Trading
27 thanks
GFIs1 1 DAX trade per day journal
25 thanks
Supertradersams Thread Journal on NQ/MNQ
24 thanks
Leaving CFD trading and learning futures
12 thanks

(login for full post details)
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350



nismo View Post
I normally use market orders and would like to try limit orders and have a few questions.

1. How do you cancel a limit order after a certain amount of time if it has not been executed (I see there is an option to convert to a market order after a set time but I just want to cancel the order)?

2. When I replace market order with limit order is it best to do a limit order + 1-2 pips? My thinking is that by the time the order gets sent the price may have moved past the price at which the order was generated at?

3. Is there any 'best practises' when using market orders?

My main reason for wanting to try limit orders is due to slippage. Would be nice if there was an order type that said by at market but no worse than 1-5pips......

Cheers,

All orders are canceled and replaced at the start of each new bar. To cancel it in effect, just don't reissue the Buy or Sell order.

You said you are seeing 1-5 pips slippage. 5 is quite a bit. What instrument and during what time frame? You will always see 1 tick "slippage" which is the price you pay for a market order. Most futures you shouldn't see more than two ticks. If you are trading something very thin, like Micro's on CME, then you can easily see spreads of 4-6 ticks especially after hours. A limit order is not likely to help you, the order simply won't get filled.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
(login for full post details)
  #4 (permalink)
nismo
Australia
 
Posts: 32 since Dec 2010
Thanks Given: 7
Thanks Received: 3

Ok so orders are canceled and replaced at the start of each new bar. How is this affected when using Intrabar Order Generation (IOG)?

Also what if you are trading a fairly high time frame and want to cancel the order without waiting till the start of the next bar?

I'm trading spot forex eur/usd which should have no liquidity problems...? In fact I'm getting way worse slippage than 5pips, sometimes I'm getting 20pips! I'm in the process of opening an account with another broker to see if its the broker at fault.

Reply With Quote
(login for full post details)
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350


nismo View Post
Ok so orders are canceled and replaced at the start of each new bar. How is this affected when using Intrabar Order Generation (IOG)?

IOG enables orders to be sent intrabar. If a condition is called for intrabar and you send an order, it will be sent to market before the bar closes. With IOG off, orders are sent at the end of the bar or start of new bar.


Quoting 
Also what if you are trading a fairly high time frame and want to cancel the order without waiting till the start of the next bar?

If you have IOG turned on, your condition is evaluated intrabar, but it behaves just like when IOG is off and after 1 bar if the condition is no longer true, the order is cancelled. For IOG, 1 bar = 1 tick. So to answer your question, if in your strategy it is no longer true to send an order to the market, then it will be cancelled automatically. There is no "Live Until Cancelled" option with EasyLanguage orders.


Quoting 
I'm trading spot forex eur/usd which should have no liquidity problems...? In fact I'm getting way worse slippage than 5pips, sometimes I'm getting 20pips! I'm in the process of opening an account with another broker to see if its the broker at fault.

Which broker? I trade with MB Trading on the EUR/USD and there is only 1 pip spread (usually less actually). I use limit orders just because they pay me to do so, but I place a limit order @ the offer. If you are seeing 20 pip spread, then it is definitely your broker who is screwing you.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following 4 users say Thank You to Big Mike for this post:
(login for full post details)
  #6 (permalink)
nismo
Australia
 
Posts: 32 since Dec 2010
Thanks Given: 7
Thanks Received: 3


Big Mike View Post

If you have IOG turned on, your condition is evaluated intrabar, but it behaves just like when IOG is off and after 1 bar if the condition is no longer true, the order is cancelled. For IOG, 1 bar = 1 tick. So to answer your question, if in your strategy it is no longer true to send an order to the market, then it will be cancelled automatically. There is no "Live Until Cancelled" option with EasyLanguage orders.

Mike

So if 1 bar = 1 tick with IOG and I send a limit order at the current close price and it doesn't get triggered on that tick then it will be canceled and a new limit order will be created on the next tick if the condition is still met?

Also if you use IOG and you enable the option to convert limit orders to market orders after 30 seconds another tick will likely become before this 30 seconds so does this limit order get cancelled?


Big Mike View Post
Which broker? I trade with MB Trading on the EUR/USD and there is only 1 pip spread (usually less actually). I use limit orders just because they pay me to do so, but I place a limit order @ the offer. If you are seeing 20 pip spread, then it is definitely your broker who is screwing you.
Mike

I am too am with MB Trading and yes their spread is low but I seem to be getting bad slippage. I will be testing with another broker so I'll know soon if its the broker or not.

Reply With Quote
The following 2 users say Thank You to nismo for this post:
(login for full post details)
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350


nismo View Post
So if 1 bar = 1 tick with IOG and I send a limit order at the current close price and it doesn't get triggered on that tick then it will be canceled and a new limit order will be created on the next tick if the condition is still met?

I'm not an expert at IOG so hopefully someone else can answer as well.

But it basically will cancel the pending order if the condition is no longer met. There was previously a discussion on whether or not it truly sends these cancellations to the exchange on a bar-by-bar or in this case tick basis. My feeling is that surely, hopefully, please god tell me, it does not. But, someone else said it did. I've not tested it nor have I seen an official answer from MultiCharts.


Quoting 
Also if you use IOG and you enable the option to convert limit orders to market orders after 30 seconds another tick will likely become before this 30 seconds so does this limit order get cancelled?

Good question. I don't know.


Quoting 
I am too am with MB Trading and yes their spread is low but I seem to be getting bad slippage. I will be testing with another broker so I'll know soon if its the broker or not.

That is really odd. Maybe 2-3 pips. But 20??? That is insane. I see you are in Australia, so your latency is probably around 300ms which doesn't help. But still, it seems impossible to see a 20 pip slip. To be clear, you are talking about a slip from 1.4300 to 1.4320. Not a fractional pip, right? The problem is very unlikely MB Trading, in my opinion. I think maybe there is something else at work, some latency problem with your connection, some AV software inspecting packets, etc.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
(login for full post details)
  #8 (permalink)
nismo
Australia
 
Posts: 32 since Dec 2010
Thanks Given: 7
Thanks Received: 3

I'll do some testing regarding limit orders and see if I can work out how they function. In the meantime I might post this over on the MC forums....


Big Mike View Post
That is really odd. Maybe 2-3 pips. But 20??? That is insane. I see you are in Australia, so your latency is probably around 300ms which doesn't help. But still, it seems impossible to see a 20 pip slip. To be clear, you are talking about a slip from 1.4300 to 1.4320. Not a fractional pip, right? The problem is very unlikely MB Trading, in my opinion. I think maybe there is something else at work, some latency problem with your connection, some AV software inspecting packets, etc.

Mike

I'm trading from a server that has 3-5ms to their servers (ping quotes.mbtrading.com). I know it sounds insane but I tested my system on a lower time frame to generate more trades and I was getting an average slippage of 3 pips over 100 trades. I never saw slippage above 8pips. I then changed only the time frame of my system (exact same code) so it generates less trades and I get 20 pip slippage. I went back to the lower time frame and now still bad slippage. So its like I had a period of good slippage and then went into a period of bad slippage. I raised a ticket with them about this and they just closed it unanswered... I will know for sure once I test with another broker.

Reply With Quote
The following user says Thank You to nismo for this post:
(login for full post details)
  #9 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350

Please define slippage. It sounds more like your strategy is not written well than actual slippage on the broker side.

Look here:


In the end the OP found it was his strategy at fault.

For example, if you use renko bars, you might call it slippage when your order isn't executed at the price you were expecting, when in effect it is not - it is a known "issue" with how renko bars are calculated and how platforms execute on the Open price of a new bar. Just an example.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
(login for full post details)
  #10 (permalink)
nismo
Australia
 
Posts: 32 since Dec 2010
Thanks Given: 7
Thanks Received: 3



Big Mike View Post
Please define slippage. It sounds more like your strategy is not written well than actual slippage on the broker side.

Look here:


In the end the OP found it was his strategy at fault.

For example, if you use renko bars, you might call it slippage when your order isn't executed at the price you were expecting, when in effect it is not - it is a known "issue" with how renko bars are calculated and how platforms execute on the Open price of a new bar. Just an example.

Mike

Mike I will reply back to this once I've tested with another broker.

How do you go about handling limit orders, more specifically how do you set a price for the limit order? In the condition where your buy I was thinking to do something like this:

 
Code
If condition1 then begin
entryVar = close;
buy next bar at entryVar limit;
end;

Reply With Quote





Last Updated on April 4, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts