Custom price and RSI script |
Post Reply |
Author | |
SteveA
Newbie Joined: 03 Mar 2005 Location: Australia Posts: 2 |
Post Options
Quote Reply
Topic: Custom price and RSI script Posted: 21 Sep 2007 at 1:20am |
If you have MS Access and know how to use it, why not just add a record to the history table? However, if you do this, be sure to delete the record again afterwards, otherwise you will not be prompted to download the daily data for that day, and could end up with a hole in your data for other securities. If you forget and mess up, any problems are easy to fix by saying that you want to download the data again, and then specifying the date range that you want to fix.
|
|
JackNader
Newbie Joined: 06 Aug 2007 Posts: 3 |
Post Options Quote Reply Posted: 09 Aug 2007 at 5:18pm |
Did you get it working Blackdog?
Thx for the reply! |
|
blackdog
Regular Joined: 14 Nov 2006 Location: Vatican City State Posts: 43 |
Post Options Quote Reply Posted: 09 Aug 2007 at 8:55am |
JackNader
I tried to make a predictor for the MACD after attending a DiNappolli seminar last year. Check out my post "Just a step to the right"
Hope this helps.
|
|
JackNader
Newbie Joined: 06 Aug 2007 Posts: 3 |
Post Options Quote Reply Posted: 07 Aug 2007 at 4:05pm |
Is it possible to add a new bar in bullscript and give it a custom closing price? If I could defined hist(c,0) as my custom price and hist(c,1) as the most current price then it would be relatively simple to resolve this scripting issue. Ref should also work, however it truncates the lastbar so that P - C is not visible!
|
|
JackNader
Newbie Joined: 06 Aug 2007 Posts: 3 |
Post Options Quote Reply Posted: 06 Aug 2007 at 8:15am |
This script replaces the most current bar's closing price with a custom price. The purpose is to probe price vs turning point of the RSI.
[horzline=50] P := input("Price",0,0); X := if ( barnumber = lastvalue(barnumber), p, c); U := ma(max( x - hist(c,1),0),14,wilders); D := ma(max( hist(c,1) - x,0),14,wilders); rs := 100 - (100/(1 + (U/D))); [color=rgb(225,128,0)] rs; My problem is that I need the script to include the current closing price as well so that I can calculate the expected price turning point in advance of market open. I tried using the ref function to solve the issue X := if ( barnumber = lastvalue(barnumber), p, ref(c,1) ); y := if ( barnumber = lastvalue(barnumber), c, c ); U := ma(max( x - y,0),14,wilders); D := ma(max( y - x,0),14,wilders); however once again I was found wanting :S Any help on this will be greatly appreciated. |
|
Post Reply |
Forum Jump | Forum Permissions 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 |