BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Custom price and RSI script
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Custom price and RSI script

 Post Reply Post Reply
Author
Message Reverse Sort Order / View First Unread Post
SteveA View Drop Down
Newbie
Newbie


Joined: 03 Mar 2005
Location: Australia
Posts: 2
Post Options Post Options   Quote SteveA Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
JackNader View Drop Down
Newbie
Newbie


Joined: 06 Aug 2007
Posts: 3
Post Options Post Options   Quote JackNader Quote  Post ReplyReply Direct Link To This Post Posted: 09 Aug 2007 at 5:18pm
Did you get it working Blackdog?
Thx for the reply!
Back to Top
blackdog View Drop Down
Regular
Regular
Avatar

Joined: 14 Nov 2006
Location: Vatican City State
Posts: 43
Post Options Post Options   Quote blackdog Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
JackNader View Drop Down
Newbie
Newbie


Joined: 06 Aug 2007
Posts: 3
Post Options Post Options   Quote JackNader Quote  Post ReplyReply Direct Link To This Post 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!


Back to Top
JackNader View Drop Down
Newbie
Newbie


Joined: 06 Aug 2007
Posts: 3
Post Options Post Options   Quote JackNader Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz