Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 4/20/2009 Posts: 188
|
in RealCode: how can one determine a specific # of days have passed from a certain date?
re: if currentdate = + 12 then
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Do you mean Trading Days or Calendar Days?
Is the RealCode only going to be used on a 1-Day Chart?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/20/2009 Posts: 188
|
hello bruce:
good ?'s. thanks for asking.
calendar days
yes used in real code on daily charts.
|
|
Registered User Joined: 4/20/2009 Posts: 188
|
Bruce:
also, u once gave me this statement for another problem i was having.
it was: '# EoD = condition.Library.End of Day
now, i am wondering what other 'great' things might be in the condition.library and how can i see them for utlitmate use? like the "realcodeAPI" which has all kinds of userful info.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can get a list of Library Conditions by selecting Add Indicator/Condition to Chart and scrolling down to the Library Conditions section.
Do you want to manually enter the date or is the date being calculated from something (say a particular Condition returning True)?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/20/2009 Posts: 188
|
bruce:
i am looking for how to tell whether have reached 'end of bar' condition.
how does one use 'barinterval as timespan'
pls. give me an example,
also, how do u tell you have gone from bar to bar using
isdaily() , know that it is daily bars, but how do you know when u have gone from one to next.
same ? for a minute, or week, but most important on day bars.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I do not understand the question.
If you are using the built in autolooping, the RealCode in the Code tab is executed once each Bar. You have gone onto the next Bar when you start running the RealCode in the Code tab from the beginning again.
The end of the currently calculated Bar would be Close of that Bar and can be referenced simply as:
Price.Last
You would not use isdaily to tell if you have gone from Bar to Bar. It just returns True if the current Bar Interval being used in the RealCode is 1-Day. So if you wanted RealCode that returned the Closing Price if the Bar Interval was set to 1-Day but the High Price if the Bar Interval was set to anything else, it would look like the following:
If isDaily = True Then
Plot = Price.Last
Else
Plot = Price.High
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |