StockFetcher Forums · General Discussion · Price Swings<< >>Post Follow-up
EdReddingII
5 posts
msg #156549
Ignore EdReddingII
4/10/2021 8:05:28 PM

Yo I found a system that involves price swings which basically takes the difference between the high and open for the last 4 days and then averages those numbers. A buy signal is created when the difference between the high and open is 1.75 times greater than the average of the last 4 days. I tried building it out, however, I can't seem to get it to work. Anyone have any suggestions?

xarlor
585 posts
msg #156550
Ignore xarlor
4/10/2021 8:18:43 PM

Protip: When asking for help, post the code you've written so far, even if it doesn't work.

Fetcher[
not otcbb
close > 1

set{x0,high minus open}
set{x1,high 1 day ago minus open 1 day ago}
set{x2,high 2 days ago minus open 2 days ago}
set{x3,high 3 days ago minus open 3 days ago}
set{x4,high 4 days ago minus open 4 days ago}

set{avg1,x1 + x2}
set{avg2,avg1 + x3}
set{avg3,avg2 + x4}
set{avg,avg3 / 4}
set{signal,avg * 1.75}
set{buy,count(x0 >= signal,1)}
buy > 0

add column x0
add column signal
]



EdReddingII
5 posts
msg #156551
Ignore EdReddingII
4/10/2021 8:32:00 PM

xarlor - will do thanks a ton!

compound_gains
222 posts
msg #156556
Ignore compound_gains
4/11/2021 11:37:34 AM

Another calculation approach for what it's worth as a code learning experience...
Fetcher[
not otcbb
close > 1
set{x0, high minus open}
set{x1, cma(x0, 4)}
set{x2, x0 / x1}
x2 => 1.75
]



StockFetcher Forums · General Discussion · Price Swings<< >>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.