StockFetcher Forums · General Discussion · Is it possible to to add days to offset?<< >>Post Follow-up
unomateo
1 posts
msg #34689
Ignore unomateo
1/2/2005 5:43:18 PM

HI,

is it possible to add days to the offset, so I can see into the future, I think this will really help me?

Just kidding, seriously,

Is it possible to set an offset, something like "offset 30 days" and then create a column with the prices of the stocks 5 days after the offset to see the results?

Example:
Find stocks trading below 50
and p/e ratio below 20
and macd above 0.05
and macd 2 days ago below 0 for 5 days
and volume is above 50000
set{initial_price, price}
/*need column with prices 5 days after initial_price, basically offset of 25 days*/
add column initial_price
offset 30 days


xplorer
257 posts
msg #34700
Ignore xplorer
1/2/2005 9:50:20 PM

This was from a previous forum .... but I am sure you can adapt to your filter:

...click on it , and you'll see what you are looking for.... its not a pretty way to do it ...but it will give you what you are looking for... the way it is written is to show the screen from 118 days ago ,,, then the next 5 days. I think it is the only true way to backtest ... without the bias of the market sentiment of TODAY ...

Fetcher[set{gainday6,close 112 days ago / close 118 days ago}
set{gainday5,close 113 days ago / close 118 days ago}
set{gainday4,close 114 days ago / close 118 days ago}
set{gainday3,close 115 days ago / close 118 days ago}
set{gainday2,close 116 days ago / close 118 days ago}
set{gainday1,close 117 days ago / close 118 days ago}
set{closeday0,close 118 days ago}
RSI(5) is greater than RSI(2) lag 118 days
and RSI(5) is less than 25 lag 118 days
and price is between than .4 and 4 lag 118 days
and Bollinger(20) is between than .01 and 3 lag 118 days
and average volume(5) is greater than 52000 lag 118 days
and add column CloseDay0
and add column gainday1
and add column gainday2
and add column gainday3
and add column gainday4
and add column gainday5
and add column gainday6
]




cegis
235 posts
msg #34736
Ignore cegis
1/4/2005 2:18:59 PM

Look for my post "Technique: Calculate returns for any period" (or something very simmilar). (A forum search on 'cegis technique' should show it prettu near the top, I think...) It describes how to do what you are looking for. While there's nothing wrong with the prior example, if you're looking for the next five day's data, it might make more sense to use 5 days ago, ..., down to 1 day ago, then use offset to look at different periods. This is all explained in my prior post.

HTH,

C


StockFetcher Forums · General Discussion · Is it possible to to add days to offset?<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.