Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

number of days Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
kd
Posted : Sunday, November 28, 2010 12:50:26 AM
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
Bruce_L
Posted : Wednesday, December 1, 2010 10:00:32 AM


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
kd
Posted : Sunday, December 5, 2010 9:59:36 AM
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.
kd
Posted : Sunday, December 5, 2010 12:05:04 PM
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.
Bruce_L
Posted : Monday, December 6, 2010 1:39:56 PM


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
kd
Posted : Monday, December 6, 2010 2:19:38 PM
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.
Bruce_L
Posted : Monday, December 6, 2010 3:58:56 PM


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
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.