Welcome to the Traders Laboratory Forums.
Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Reply
Old 07-27-2009, 04:40 PM   #1

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post

EL Code Doubt

Hi guys, when in an intraday strategy if i give buystop orders or sell stop orders then even after that day i mean the next day also the order is in place and the order executed at the open of the next day how to solve this problem?
i want all the orders to be cancelled before moving to the next day(this problem is there when giving stop orders).
rajatheroyal is offline  
Reply With Quote
Old 07-28-2009, 04:16 AM   #2

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post

Re: EL Code Doubt

see the code below:
vars:hi(0),lo(0);

if time=1000 then{calculating high and low of the 10 am bar}
hi=high;
lo=low;
end;
buy next bar at hi stop;{placing orders to buy at high stop}
sellshort next bar at low stop;{placing orders to buy at low}


in this code the problem is that the orders get filled even on the next day and i dont want that.I want just the order to be filled that day itself if not then all orders should be cancelled.
how to do can anybody help pls.
rajatheroyal is offline  
Reply With Quote
Old 07-28-2009, 08:26 AM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,778
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: EL Code Doubt

may I suggest...

Building Winning Trading Systems with tradestation
by George Pruitt & John R. Hill

"When you code (slang for writing your ideas into a programming language) an analysis technique, you are directing the computer to follow your instructions to..."

Key Phrases: buy next bar, buytocover next bar, certain price stop, Futures Truth, Super Combo, Dynamic Break Out ...






http://www.amazon.com/Building-Winni...8783817&sr=8-1
Tams is offline  
Reply With Quote
Old 07-28-2009, 08:29 AM   #4

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,778
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: EL Code Doubt

another suggestion:

go to the EasyLanguage Dictionary...

read through all the keywords once.
(at least the strategy order keywords!)
Tams is offline  
Reply With Quote
Old 07-28-2009, 09:20 AM   #5

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post

Re: EL Code Doubt

Hi Tams, i am reading that book and i have memorised all the strategy orders key words but my problem is that if we give stop orders in intraday day then that order is not cancelled and goes to the next day also.
for example see the code below:

Inputs: longLength(5), shortLength(5);
Buy tomorrow at Highest(High,longLength) stop;
Sell Short tomorrow at Lowest(Low,shortLength) stop;

when i put this strategy then when the next day opens it buy or sells in the opening bar itself( that is it takes the orders of previous days).
But what i intend is to cancell all orders that day itself.
for example if the next day opens, it should calculate from the first bar the highest high of bars and lowest low of 5 bars for entering.(It should not take previous days counting of bars)
is there any way to do it?
Thanks very much Tams for giving ur time to answer a newbie's questions.
rajatheroyal is offline  
Reply With Quote
Old 07-28-2009, 09:45 AM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,778
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: EL Code Doubt

try this:

write out your ideas one logic at a time
write out your logic one thought at a time,
write out your thoughts one action at a time,
write out your actions one line at a time,

think of the computer as a dumb machine.
it can only take one instruction at a time,
you have to give it step by step directions...
otherwise it will be confused.

if you can write out your thoughts in the above underlined fashion,
maybe I can give you a hand.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
TIKITRADER (07-28-2009)
Old 07-28-2009, 09:49 AM   #7

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post

Re: EL Code Doubt

Thanks Tams i will follow it.
rajatheroyal is offline  
Reply With Quote
Old 07-28-2009, 11:15 AM   #8

Join Date: Jan 2009
Location: tiruchendur
Posts: 38
Ignore this user

Thanks: 51
Thanked 1 Time in 1 Post

Re: EL Code Doubt

HI guys now its working.I just gave
time>1000 and time < 1530{start and end time of our market}
before giving orders
rajatheroyal is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Code chrisleonard Coding Forum 3 07-10-2009 08:55 AM
What EL Code Should I Use ? emptyvault Coding Forum 4 07-01-2009 10:08 AM
ADE Code karsat Coding Forum 0 03-08-2009 08:06 PM
P&F Code point-figure Coding Forum 0 02-17-2009 06:24 AM
Help To Code My EA pepe1 Coding Forum 0 06-24-2008 01:41 PM

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