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 |

Intra day Price change today vs prior day price change Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
john263
Posted : Tuesday, April 21, 2009 3:01:31 PM
Registered User
Joined: 10/7/2004
Posts: 26
If the current day price direction is opposite the prior day,

can you please show me the code that would allow me to sort a watchlist by the difference in  (percent if possible) price chjange today vs the percent price change of the prior day.

For instance:
If the prior day change was -1/2% (-.5%) and the current intra day change was +.8% then the scan would show positive .3%.

If the prior day change was +.6% and the current intra day change was -1% then the scan would show negative  - .4%.

thank you


StockGuy
Posted : Tuesday, April 21, 2009 3:11:01 PM

Administration

Joined: 9/30/2004
Posts: 9,187
Create a RealCode indicator using the following code:

plot = ((price.Close - price.close(1)) / price.close(1) * 100) _
 + ((price.Close(1) - price.close(2))/price.close(2) * 100)

Once plotted, you can drag it to the watchlist to sort by that value.
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.