Search Google


Go Back   Forex Scam Reviews & Ratings > Tools & Utilities > Trading Software > TradeStation - Reviews & Tips & Tricks

Share This Forum!  
 
 
           

Sponsored Links

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2010, 12:01 PM
Junior Member
 
Join Date: Jan 2010
Posts: 3,478,205
Tournaments Joined: 0
Tournament Wins: 0
Default Help with time() and highest()

Sponsored Links
Hi.


How can we especify a time range in EL using as the start point the previous day?


Let me explain, ES starts trading at 4:30 pm ET until 4:15 ET the next day. How can I write this in EL? How can I "call" for a especific hour from yesterday until today's?


For EL, the trading starts at midnight. Date() or Time() functions are examples of that.


I know I need to say something like:

time > 1630 and time < 1615


The questions is how to say that 1630 is yesterday's time


Now another question, this time about the Highest() / Lowest() functions.


How can I plot the first hour trading, or better said, how can I plot the highest and lowest price made in the first trading hour?


All the highest() and lowest() functions have a period parameter. In this case I don't need a period parameter since the period is given by a specific time range.


In Metastock this should be something like; ValueWhen(1,tRange,HighestSince(1,start,High)). In english this says to plot the most recent highest high since the start (hour selected), for the most recent time range (trading session) selected. ValueWhen() function would then extended those values until the end of the time range selected.


I tried something like this:

[b]stTime = 0930;

enTime = 1030;

condition1 = time>stTime and time
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-14-2010, 12:01 PM
Junior Member
 
Join Date: Jan 2010
Posts: 3,478,205
Tournaments Joined: 0
Tournament Wins: 0
Default Re: Help with time() and highest()

Instead of using the time of day you can do such things as use variables to lock in that period or even use BarNumber to determine location. In this manner the day that the time falls on would be not relevant any longer.


For the second one, many ways to do thiat, but really all you have to do is set two variables that you reset to extreme values before entering the range. One for the high and one for the low and then on each bar within the range you are wanting you will check to see if the incoming high or low exceeds the previous bars values and if so then you reset your variables to hold the new values. At the end of the range you will then know the highest and lowest values.
Reply With Quote
  #3 (permalink)  
Old 07-14-2010, 12:01 PM
Junior Member
 
Join Date: Jan 2010
Posts: 3,478,205
Tournaments Joined: 0
Tournament Wins: 0
Default Re: Help with time() and highest()



Thank you StratOpt.


Part of the problem has been solved.


Regards,

ptcman
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Sponsored Links



Powered by Blogger 9®
Copyright ©2000 - 2012,Dynex Forum Ltd.