New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

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

How to compare last 3min.-bar to yesterdays closing price? Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
leonhardt
Posted : Tuesday, February 12, 2019 3:19:44 AM
Registered User
Joined: 10/10/2016
Posts: 7

Hello,

I am looking for a way to compare intraday if the 'last 3-minute-bar' closed below the 'closing price of yesterday'. But so far I am failing. One reason for this seems the fact, that mixing time-frames in setting up scans is not possible. But I assume this must be programmable, especially if this indicator still works: Closing price on specific day -  C'MM/DD/YY'

Could you help me on this issue?

Regards from Germany

Bruce_L
Posted : Tuesday, February 12, 2019 10:19:40 AM


Worden Trainer

Joined: 10/7/2004
Posts: 64,759

The following works in a 3-minute time frame in my copy of TC2000 v18 (unfortunately the version can make a difference when trying to reference the date in an intraday time frame).

C1 < C'2/11/19'

The above assumes the "last 3-minute-bar" is the previous bar and not the currently forming bar. If you are interested in the currently forming bar, you can just use the following daily formula instead.

C < C1

That said, my computer is set to use the MM/DD/YY time format. If your computer is not set this way, you may want to try setting the date format to match your local settings instead to see if it makes a difference.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
leonhardt
Posted : Wednesday, February 13, 2019 1:01:48 AM
Registered User
Joined: 10/10/2016
Posts: 7

Hello Bruce,

thanX for the super fast response - my compliments to you and Worden for this phantastic support and this forum.

I will check it out and let you know how it worked.

Regards Leon.

Bruce_L
Posted : Wednesday, February 13, 2019 9:29:35 AM


Worden Trainer

Joined: 10/7/2004
Posts: 64,759

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
leonhardt
Posted : Wednesday, February 13, 2019 11:21:05 AM
Registered User
Joined: 10/10/2016
Posts: 7

Hello Bruce,

unfortunately it does not produce proper results. I assume I have chose some parameters of the condition wrong. Would love to enter a picture here, but somehow can't upload any graphics. So I will describe what I did:

  • Calculation I entered in Condition: ( C1 < C'2/12/19' )
  • Formula Value: Is true
  • True: Now
  • TimeFrame: 3 Minute

At time of writing this message this brings back 1131 results. Many correct but i.e. it brings back GILD or CEP which did not trade in negative territory the whole day. 

ThanX for all help in advance !

Best regards - Leon.

Bruce_L
Posted : Wednesday, February 13, 2019 11:39:21 AM


Worden Trainer

Joined: 10/7/2004
Posts: 64,759

Try it using the current date instead (I know this is counterintuitive).

C1 < C'2/13/19'



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
leonhardt
Posted : Thursday, February 14, 2019 11:28:23 AM
Registered User
Joined: 10/10/2016
Posts: 7

Hello Bruce,

as you said - it is counterintuitive BUT it works ;-)

Could you also say WHY ? I mean I am scanning for todays 3min.-bars and compare them explicit with yesterdays date BUT to get correct results I have to enter todays date. I do not mind as I do not have other formulas using the date formula C'MM/DD/YY' - but strange it is.

Regards Leon.

Bruce_L
Posted : Thursday, February 14, 2019 12:01:35 PM


Worden Trainer

Joined: 10/7/2004
Posts: 64,759

As mentoned, using dates in intraday formulas actually works differently in different versions of TC2000.

That said, I think the reason it works is that when no time is specified as part of the date (and there isn't any syntax for doing so), it fills in the time as midnight (or 00:00:00). So the program finds out what the value of whatever is being checked in the intraday time frame using midnight at the start of the day. Since there aren't any bars yet for the new trading day at midnight, you get the last intraday value from the previous day as the value being referenced.



-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.