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

Reply
Old 05-27-2010, 03:10 PM   #9

Tams's Avatar

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

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

Re: Intraday Orders (EL)

Quote:
Originally Posted by GRANDEUR »
Sorry, I got it. I just edited #3 of the list above:
3.If high of a bar > all previous highs of today so far AND IT IS > (TODAY'S OPEN+100) then that high is 'highesthigh' (HH).

Here is what I wrote so far:
if time=0930 then value1=open;
if entriestoday(date)<1 and time>0930 and time<1630 and h>(value1+100) then value2=h;
if entriestoday(date)<1 and time>0930 and time<1630 and h>(value1+100)
then sell short next bar at (value2-50) stop;
if time>1630 then buy to cover next bar at market;

When I apply this code, trades are executed not at (HH-50) during the day but at (high [of the bar prior to entry]-50).
more housekeeping before we get into the nitty-gritty..

organize your thoughts/logics,
separate the "global" requirement from the detail logics
so that the code does not look crowded.
i.e. make it easy to read and debug.

e.g.
you can separate this requirement from the detail logics
time>0930 and time<1630

Code:
var:
trading.hour(false);

trading.hour = time>0930 and time<1630;

if trading.hour = true then
begin
     {--- write your codes here---}
end;
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 05-29-2010, 05:10 AM   #10
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: Intraday Orders (EL)

write out your thoughts step by step,

Xcellent TAMS (as always) and so patient...

It's good 2 follow your logic process 2 built an algorytm

After it's a question of reading the EL manual, ain't it ?!

rgds
aaa is offline  
Reply With Quote
The Following User Says Thank You to aaa For This Useful Post:
Tams (05-29-2010)
Old 05-29-2010, 10:12 AM   #11

Tams's Avatar

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

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

Re: Intraday Orders (EL)

Quote:
Originally Posted by aaa »
write out your thoughts step by step,

Xcellent TAMS (as always) and so patient...

It's good 2 follow your logic process 2 built an algorytm

After it's a question of reading the EL manual, ain't it ?!

rgds
Yes... reading the manual is a must.

EasyLanguage has been around for ~20 years;
their manuals and tutorials are the result of years of refinement,
no other trading programming language can rival its
breadth and depth in coverage and code samples.

I would dare to say, practically anything that you can imagine, has been done.
It is only a matter of time to search out the fragment of code that is floating around in the ether space.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
aaa (05-29-2010)
Old 05-31-2010, 01:03 AM   #12

Join Date: Nov 2008
Location: Orel
Posts: 33
Ignore this user

Thanks: 5
Thanked 4 Times in 2 Posts

Re: Intraday Orders (EL)

Tams, you're right as always. I'll try to organize my thoughts once again and maybe I'll come up with an answer. If not, I beg your pardon to resume the thread
GRANDEUR is offline  
Reply With Quote
Old 05-31-2010, 10:26 AM   #13

alex_laxya's Avatar

Join Date: Aug 2008
Location: pune
Posts: 61
Ignore this user

Thanks: 66
Thanked 43 Times in 17 Posts

Re: Intraday Orders (EL)

I am also learning easy language since few days, so lets learn together
1) I think you need to write the function for new high for the day, as there is only default indicator( Not sure about TS, my platform is MC), not default function..function will be like this
Code:
variables: var0( 0 ) ; 

if BarType < 2 then begin                         
	if Date <> Date[1] then
		var0 = High 
	else if High > var0 then 
		
		var0 = High ;
		
		NEWHD=var0;
		end  ;
2)write most of the inputs when u want to use numbers within code.
So your 50 point below new high of the day will look like this

Code:
Inputs: filter(50),opentime(0930),closetime(1630);
vars:trigger(0),newhdShort(false) ;
trigger = newhd[1] - filter ; 
If marketposition = 0 then
 begin
newhdShort =  (time > opentime and time < closetime) and high <= newhd[1] - filter ;
If newhdshort then sell short next bar at trigger stop ; 
setexitonclose ; 
end;
Thats the rough code i have posted, you can improvise on that as per your specific need.
alex_laxya is offline  
Reply With Quote
Old 06-01-2010, 04:01 AM   #14

Join Date: Nov 2008
Location: Orel
Posts: 33
Ignore this user

Thanks: 5
Thanked 4 Times in 2 Posts

Re: Intraday Orders (EL)

Alex, thank you for you reply!
Your approach appeals to me. I am also using MultiCharts but it fails to compile the function you wrote. The error is 'assignment is allowed only for variables or array elements' and 'NEWHD' is highlighted. Why is that? I've never created any functions, only signals. Maybe there is a mistake there.
And as for variables assignment under 'inputs', I know about that. I just wanted to write the code as small as possible not loading people with lots of words.
GRANDEUR is offline  
Reply With Quote
Old 06-01-2010, 07:23 PM   #15

alex_laxya's Avatar

Join Date: Aug 2008
Location: pune
Posts: 61
Ignore this user

Thanks: 66
Thanked 43 Times in 17 Posts

Re: Intraday Orders (EL)

Quote:
Originally Posted by GRANDEUR »
Alex, thank you for you reply!
Your approach appeals to me. I am also using MultiCharts but it fails to compile the function you wrote. The error is 'assignment is allowed only for variables or array elements' and 'NEWHD' is highlighted. Why is that? I've never created any functions, only signals. Maybe there is a mistake there.
And as for variables assignment under 'inputs', I know about that. I just wanted to write the code as small as possible not loading people with lots of words.
in MC make a new function > give a name NEWHD > now copy pest my above posted function. It should work/ compile. Trick is giving name to the function. Later make new signal, give any name, and copy pest second code. Let me know if have any further issues.
alex_laxya is offline  
Reply With Quote
Old 06-03-2010, 03:42 AM   #16

Join Date: Nov 2008
Location: Orel
Posts: 33
Ignore this user

Thanks: 5
Thanked 4 Times in 2 Posts

Re: Intraday Orders (EL)

I am new to making functions and named the function you posted not 'NEWHD'.
Although, the code doen't work OK so far (there comes only one trade for many mounths), I hope my tuning will help. Alex, thank you so much!
GRANDEUR is offline  
Reply With Quote
The Following User Says Thank You to GRANDEUR For This Useful Post:
alex_laxya (06-04-2010)

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
Intraday 1minute Data for Nasdaq balapandian Trading and the Markets 3 06-21-2010 10:16 AM

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