NexusFi: Find Your Edge


Home Menu

 





How can I convert a failed limit order to a market order?


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one ABCTG with 1 posts (1 thanks)
    2. looks_two tradingest with 1 posts (1 thanks)
    3. looks_3 ELong with 1 posts (0 thanks)
    4. looks_4 HoopyTrading with 1 posts (1 thanks)
    1. trending_up 1,695 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

How can I convert a failed limit order to a market order?

  #1 (permalink)
ELong
Chicago
 
Posts: 4 since Apr 2013
Thanks Given: 3
Thanks Received: 0

Hello,
Has anyone written EL code to convert a failed limit order on a range bar into a market order on the following range bar? I am trying to write some order handling instructions that initiate a limit order under certain conditions, however if the order is not filled, I would like the order to go out as a market order on the next bar. Any suggestions are appreciated. Thank you.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strategy stop orders partially filled
EasyLanguage Programming
Cheap historycal L1 data for stocks
Stocks and ETFs
Footprint for strategy Builder
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
57 thanks
Just another trading journal: PA, Wyckoff & Trends
16 thanks
Trading with Intuition
15 thanks
Self sabotage reframed
15 thanks
GFIs1 1 DAX trade per day journal
8 thanks
  #2 (permalink)
 
tradingest's Avatar
 tradingest 
Milan, Italy
 
Experience: Master
Platform: NT8
Trading: Futures, Forex
Posts: 111 since Dec 2014
Thanks Given: 9
Thanks Received: 11

if you post the code I can help you

Sent from my SM-G900F using NexusFi mobile app

Reply With Quote
Thanked by:
  #3 (permalink)
 HoopyTrading 
Boston, MA
 
Posts: 264 since Apr 2014



ELong View Post
Hello,
Has anyone written EL code to convert a failed limit order on a range bar into a market order on the following range bar? I am trying to write some order handling instructions that initiate a limit order under certain conditions, however if the order is not filled, I would like the order to go out as a market order on the next bar. Any suggestions are appreciated. Thank you.

Hrmm. You know, I have seen this, or something like it, in Ninja. It has something similar. It's basically like this...

You set a stop limit order with an offset in ticks on your desired direction.

So for example, in a long, say you have a stop limit order to buy one GC long at 1000.00. The current price is at 999. The price heads up to 1000.x When the stop is hit when the price gets to 1000.00, your limit order gets placed at, say, 1000.50? Is that the same thing that ye be looking for?

Hrmm, if the limit order is not filled, turn it into a market order...Oh wait, wouldn't that be a "market-if-touched" thingy?

Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 484
Thanks Received: 1,629

ELong,

orders in Multicharts remain alive as long as the conditions that triggered the order stay unchanged. As you can't convert the order type it would work along the lines of cancel your limit order and send a market order instead.
The code for the above would depend on the code you have, but in general you'd make sure that the conditions that keep the limit order alive are set back to false at the end of the bar (or at the beginning of the new bar) and instead your code sends a market order at that moment.

I assume the build in feature to convert limit orders to market orders after X seconds can't be used here due to the range bars (and thus you don't know in advance when the bar closes).

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on August 31, 2016


© 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