Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 02-03-2010, 02:55 AM   #1

Join Date: Oct 2008
Location: Vilnius
Posts: 11
Ignore this user

Thanks: 2
Thanked 0 Times in 0 Posts



Market Order

hi,

I need you help. Is there in easylangue some kind of function "buy at market as soon as price touches the line or value of previuose close"? I need to fill this order imediatly not on NEXT bar, is it possible?

Thank you!
mklevas is offline  
Reply With Quote
Old 02-03-2010, 05:04 AM   #2

Join Date: Jul 2009
Location: London
Posts: 365
Ignore this user

Thanks: 206
Thanked 195 Times in 124 Posts



Re: Market Order

Others who are better at programming will be more likely to be able to help you here.... but in brief

depending on the system you use.

If say you are trading off hourly charts you need to have the information/data that makes up the hourly chart.... that is the tick data, or minute data. Otherwise the computer does not know the sequence of trades that occurred.

example; The bar you trade on has a high of 102, low 99 - your system tells you to sell at 100, stop 101 within this bar.
did the order trigger at 100, then stop you out at 101, OR did the high occur before the trade triggered. A computer will not know unless you provide it with the data.

I know Multicharts tries this, as do some other programs, some making a few assumptions based on the open and close of the bar....but ultimately you may have to accept most things become a fudge unless you account for every tick....

I hope this helps at least understand the issue.
DugDug is offline  
Reply With Quote
Old 02-03-2010, 06:05 AM   #3

Join Date: Oct 2008
Location: Vilnius
Posts: 11
Ignore this user

Thanks: 2
Thanked 0 Times in 0 Posts



Re: Market Order

You wrote:
"A computer will not know unless you provide it with the data." But if i will wrote that i want to sell at bar low 99, thet it's possible?
I know that in EL are order types "next bar at open", "next bar at close", "this bar at close" and etc. But i cannot find order type which can trigger order imediataly if my target price is recahed. Let say first bar has 100 high and 98 low, i want to sell if second bar reaches low of first bar and sell it immediatly not on close of second bar. How can i achieve this?
mklevas is offline  
Reply With Quote
Old 02-03-2010, 06:10 AM   #4

Join Date: Jul 2009
Location: London
Posts: 365
Ignore this user

Thanks: 206
Thanked 195 Times in 124 Posts



Re: Market Order

Not sure re easy language etc- my coding is very basic.... sorry, I just understand some of the issues involved.
I am sure there are plenty of examples around that might show this in these and other forums..... it should be possible, if not then it could be argued the systems are not lfexible enough.... I used excel to backtest my ideas because of this - slower but easier to use and completely transparent.
maybe one day I will learn more.
DugDug is offline  
Reply With Quote
The Following User Says Thank You to DugDug For This Useful Post:
mklevas (02-03-2010)
Old 02-03-2010, 10:46 AM   #5

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts



Re: Market Order

With

[IntrabarOrderGeneration = True]

in a strategy and no conflicting barstatus statements then

buy next bar market;

means immediately (next tick) (for intrabar a tick is a trade)
statsign is offline  
Reply With Quote
Old 02-03-2010, 11:20 AM   #6

Join Date: Jul 2009
Location: London
Posts: 365
Ignore this user

Thanks: 206
Thanked 195 Times in 124 Posts



Re: Market Order

hi Statsign,
please correct me if I am wrong here, as I dont have a lot of programming experience
your suggestion only works IF you have intra bar data?
ie; if using hourly charts, with OHLC only for the hourly chart, you need to be able to look inside the bar.... ie; the data must be in the form of tick, or say minute data.
If my data is say an ASCI imported file, it might not have this
Is this true?
....thanks
DugDug is offline  
Reply With Quote
Old 02-03-2010, 11:29 AM   #7

Join Date: Feb 2008
Location: charleston
Posts: 63
Ignore this user

Thanks: 7
Thanked 21 Times in 16 Posts



Re: Market Order

Right, ASCI imported file with only OHLC is no good for strategy testing unless you only want to trade based on

buy next bar open;
sell next bar open;

you can simulate somewhat with

buy next bar somenumber limit;

but if using limits and stops then without intrabar data you will get some erroneous trades
statsign is offline  
Reply With Quote
The Following User Says Thank You to statsign For This Useful Post:
DugDug (02-03-2010)
Old 03-01-2010, 02:00 PM   #8

JKLM's Avatar

Join Date: Nov 2008
Location: ST
Posts: 47
Ignore this user

Thanks: 14
Thanked 34 Times in 19 Posts



Re: Market Order

I have similar problem
and I understand that on time bars you cant do anything, becauase bar must be closed

but I was thinking ...if I use range bars
and range bars close price can be predicted ...I was thinking
how can I send stop order to broker at bar close price before bar is closed

this way I maybe I can get better fill because broker alredy have my stop ( market ) order
JKLM is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Order Flow & Market Profile Webinar electroniclocal Market Profile 4 01-18-2010 02:30 PM
Stop Order or Logical Order ? abam Trading and the Markets 4 04-06-2009 05:19 AM
Order Imbalances?? MRW Stock Trading Laboratory 0 05-29-2008 08:29 PM
[Essay] Market Depth & Order Flow hanz Trading Articles 1 10-13-2007 08:14 PM
Order spoofing notouch Market Analysis 12 03-20-2007 09:07 AM

All times are GMT -4. The time now is 02:38 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.