Determine value of indicator for next day
Author: grtrader
Creation Date: 11/12/2018 12:50 PM
profile picture

grtrader

#1
How can I manually input a hypothetical close in a series for the next day to determine what an associated indicator value will be for tomorrow?
profile picture

Eugene

#2
Could you clarify your objective with as much detail as possible?
profile picture

superticker

#3
QUOTE:
... to determine [predict] what an associated indicator value will be for tomorrow?
One option is to extrapolate the value of interest with the TSF indicator. http://www2.wealth-lab.com/WL5Wiki/TSF.ashx The documentation for the TSF indicator is wrong. You want to employ a positive ProjectionBar to extrapolate into the future. I use this extrapolation indicator myself, and it works well.

As to whether linear extrapolation (i.e. first-order extrapolation) is the best approach for the indicator you're trying to predict is another question. Some WL indicators come with reverse engineered (RevEngIndicator) implementations, which would work somewhat better than simple linear extrapolation.

You could fit higher ordered extrapolations, but I think for fuzzy system analysis (i.e. stock trading), that would be an overkill.
profile picture

grtrader

#4
I want to avoid the delay of buying or selling the next day which amounts to loss of profit. I cannot get a signal today based on a close because of definition. However, if I can determine what close value would give me a buy signal today and if the stock price is higher than that value about a half hour before the market closes, I can with pretty much confidence buy the stock today.


How to accomplish:


1. Determine how to extend the bar series by 1 day and insert a manual price for the last day. ( This I do not know how to do)

2. Program a loop to iterate based on price until the signal gives me a buy signal.

3. If, at almost market closing, that price is above the determined trigger price, I can go ahead and buy the stock today instead of tomorrow.
profile picture

Eugene

#5
QUOTE:
How can I manually input a hypothetical close in a series for the next day to determine what an associated indicator value will be for tomorrow?

Maybe you're looking for this...

"What if Close was different?" - Analysis

...Or maybe this as @superticker suggests:

RevEngSMA_TC (Tomorrow's Close)
ReverseEMA
RevEngMACD
RevEngMACDSignal
RevEngRSI
profile picture

Cone

#6
RevEngSMA_TC (Tomorrow's Close) works 98+% of the time for signaling moving average crossovers 1 day in advance.

1. You can't extend the Bars series, but you can move the values back by 1 (or more) bars and add a new value at the end. (For a generic DataSeries you can just use the << operator, but that doesn't work for Bars.)

CODE:
Please log in to see this code.


2. If you know you want to buy, just buy! Need more info for this request.

3. Practically speaking, you can't do this with EOD data, although with the Bars shift technique above you could do it by manually or otherwise entering the 'final' values just before the close.

Also, with intraday data, you can calculate an EOD value for an indicator using intraday data at any point in the day. I called them "hybrid indicators" - https://www.wealth-lab.com/Forum/Posts/Just-published-ActiveTrader-2011-01-Trading-Hybrid-Indicators-31311


Again, it would help to know precisely what indicators you're using.
profile picture

grtrader

#7
Cone save the day again! This is exactly what I have been looking for.

After years of back testing, I have found that results are much better using buy and sell on close. Since I only use EOD data, I have been looking for a method to determine the trigger points for the day ahead of time and either buy or sell once that trigger has been met. I have seen many times when a sell signal has been given, only to find that the stock gaps down even more the next day.

The above program can be used to iterate with closing prices above and below the close from the previous day to determine the trigger point and display it in the program for the current day. It would be more accurate than extrapolating. The only requirement would be that one would have to monitor the stock prior to closing and to then place the buy or sell.

The actual indicator is immaterial. It can be used on any one.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).