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


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Net change for same day Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Gaute
Posted : Tuesday, September 16, 2008 10:55:38 AM
Registered User
Joined: 2/15/2008
Posts: 155
Pls help. Right now the net change and percent change that is available in "Load Column" list gives the changes from last close previous day.  I would like to show price change (% and net) from opening same day.

Also, is there a way to display a text note next to a symbol in a watch-list?

Thanks for all replies.
StockGuy
Posted : Tuesday, September 16, 2008 11:57:43 AM

Administration

Joined: 9/30/2004
Posts: 9,187
Add RealCode indicators to your chart using the following code:

For Net Change:

plot = price.close - price.open

For % Change:

plot = (price.close - price.open) / price.close *100

Then drag each plot to watchlist and choose Raw Value.  You can hide the panes by clicking the pushpin icon on each.
Gaute
Posted : Tuesday, September 16, 2008 4:27:07 PM
Registered User
Joined: 2/15/2008
Posts: 155
That was too easy for you.  That works great on a day chart but is there a way to do the same thing that would work during live feed say on a 5 min chart (RT).  In other words ,I would like to see the percent change from current bar to the first opening price.

I want to get ready to buy when the price is moving up to around 3% from the first bar opening price or is 3% above the first bar opening price.  Hope this all makes sense.

Thanks for replies...
Bruce_L
Posted : Tuesday, September 16, 2008 4:31:50 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Gaute,
Please try Dragging and Dropping the following RealCode Indicators instead:

'Daily Net Change From Open
Static Open As Single
If isFirstBar Then Open = Single.NaN
If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    Open = Price.Open
End If
Plot = Price.Last - Open

'Daily Perent Change From Open
Static Open As Single
If isFirstBar Then Open = Single.NaN
If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    Open = Price.Open
End If
Plot = 100 * (Price.Last / Open - 1)

It should work as long as the Time Frame is Daily or shorter.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gaute
Posted : Tuesday, September 16, 2008 5:19:26 PM
Registered User
Joined: 2/15/2008
Posts: 155
Bruce, thanks for the quick response, but didn't work.  First thing the line #16 Static Open As Single gave an error that it didn't need to be repeated.  I deleted the line but the indicator only calculated the difference between each bar.  Example it gave the change of the open and close of each 15 min bar.

However it workd great on a daily chart.

Thanks,
Bruce_L
Posted : Tuesday, September 16, 2008 5:23:58 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Gaute,
It's two different Indicators.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gaute
Posted : Tuesday, September 16, 2008 5:40:52 PM
Registered User
Joined: 2/15/2008
Posts: 155
Well, create  a "paintbrush" and color me stupid.....

Thanks,
Gaute
Posted : Tuesday, September 16, 2008 5:51:16 PM
Registered User
Joined: 2/15/2008
Posts: 155
Keep the brush handy, What does each indicator "indicate".
Bruce_L
Posted : Tuesday, September 16, 2008 6:13:25 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Gaute,
They indicate exactly what the first line of each Indicator says (and what I thought you requested). The first Indicator returns the Daily Net Change From Open while the second Indicator returns the Daily Perent Change From Open. They return these values in any Time Frame that is Daily or shorter.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gaute
Posted : Wednesday, September 17, 2008 8:37:38 AM
Registered User
Joined: 2/15/2008
Posts: 155

The percent change works on the daily but what I would like to have is an indicator that give the %change from the latest close  (say, on a 5 min chart) to the 9:30 open price.    Example If the 9:30 open is $10 and the 2:30 price is $11  I want to see the difference at  that time and every 5 min move.  This may not be possible.

Bruce, thanks for the time you have given this post.

Bruce_L
Posted : Wednesday, September 17, 2008 8:57:06 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Gaute,
I know that's what you want and that's exactly what is Plotted. I think I understand why you might think otherwise however. While the Plot is correct, not enough data is being used to calculate the Value when it is Dragged and Dropped to the Watchlist for use as a Watchlist Column. The following adjustments seem to force the Watchlist Column to use enough data without the Indicator being Cumulative or manually setting the amount of data required:

'Daily Net Change From Open
Static Open As Single
If isFirstBar Then
    Open = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    Open = Price.Open
End If
Plot = Price.Last - Open

'Daily Perent Change From Open
Static Open As Single
If isFirstBar Then
    Open = Single.NaN
Else If Price.DateValue.DayOfYear <> Price.DateValue(1).DayOfYear Then
    Open = Price.Open
End If
Plot = 100 * (Price.Last / Open - 1)

I've only tested this before the Market Opens however. If it doesn't force enough data to be used once the Market Opens, we'll need to make some additonal adjustments.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gaute
Posted : Wednesday, September 17, 2008 12:58:53 PM
Registered User
Joined: 2/15/2008
Posts: 155
Thanks, I'll give it a try.
Bruce_L
Posted : Wednesday, September 17, 2008 1:04:40 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Gaute,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gaute
Posted : Wednesday, September 17, 2008 4:12:44 PM
Registered User
Joined: 2/15/2008
Posts: 155
Bruce, I just shared the layout.  It works great.  If I wanted to have a 3 decimal places instead of two how could I change the formula.

Great work.
Bruce_L
Posted : Wednesday, September 17, 2008 4:22:58 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Gaute,
You wouldn't change anything in the RealCode Indicators. If you wanted to adjust the number of digits displayed in the Watchlist Column, you would left-click on the Watchlist Column Header to bring up QuickEdit and then change the Number Format in the Formatting tab.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mrlucky1xx
Posted : Wednesday, October 1, 2008 10:26:40 PM
Registered User
Joined: 9/24/2008
Posts: 31
This seems to work ok but it doesn't seem to sort propery.  Try descending sort on nas 100
mrlucky1xx
Posted : Wednesday, October 1, 2008 10:35:38 PM
Registered User
Joined: 9/24/2008
Posts: 31
ok... I had some other conditions in there  that messed it up.... I did NOT have any conflicting sort info however
Bruce_L
Posted : Thursday, October 2, 2008 9:09:09 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
mrlucky1xx,
I'm not able to reproduce this when using the RealCode from my Wednesday, September 17, 2008 8:57:06 AM ET post. As long as it is selected as the Sort, it Sorts the Watchlist in the correct order. If the Watchlist has a Filter applied, the Filtered Watchlist is sorted in the correct order. If the Watchlist has one or more Watchlist Light based Scans applied, the Watchlist is sorted in the correct order within the Scan (which takes priority).

Are you using the RealCode from my Tuesday, September 16, 2008 4:31:50 PM ET post? If so, an explanation was already provided as to why it doesn't work correctly as a Watchlist Column. It was left in the post as a training example to show the differences between the versions that works as a Watchlist Column and the version that doesn't.

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