Hello!
First of all i’d like to say i have little to none, experience in stock, nor PRT.
The problem i’m facing is with the Highest[DaysToLookBackUpon]. Once i try to use it with over 255, one byte in size i am unable to get results, nor do i get an error.
Why is that, is there some unwritten rules, crappy tinyInt hiding, or am i using it wrong?
Any input would be appricated.
The idea was to search for peaks last days, compared to a larger amount of backdays. That would sort out some items, which with fundamental information might be a good short etc.
DaysToLookBackUpon = 255 // seams like this cannot hold more than 255 days (variable error? tinyint??!)
MaxAmountOfDaysSincePeak = 10
CheckIfDeclineHasBegun = 1 // Change this to skip checking if last days has been worst than those before
DaysToCompareDeclineTo = 20
DecliningDays = 5
condition1 = ( Highest[DaysToLookBackUpon](close) = Highest[MaxAmountOfDaysSincePeak](close))
//Check if first days(close) is less than last days(close), to view if peak has peaked.
if CheckIfDeclineHasBegun = 1 then
condition2 = ( Highest[DaysToCompareDeclineTo](close[DecliningDays]) < Highest[DecliningDays](close[0]))
else
condition2 = 1
endif
FilterOutJunk = (average[100](volume) > 150000)
SCREENER[condition1 AND condition2 AND FilterOutJunk](average[15](close)-close as "close")
The reason is that ProSceener has a limit of 254 bars lookback from the current candlestick. Try to reduce your ‘DaysToLookBackUpon’ variable to 254..253 or 252 to see what happen.
I see, then i know the reason, Thanks!
On another matter, how do i make a lasting variable, over several days, Ie lets say i want to return the 10 highest Points, over 254 days. Along with Close, and barindex, or way to figure out which day.
Each loop i’d like to evaluate and stick into list, array if it matches conditions, etc. But i am unable to make such allocations, they always reset.
// David
I’m sorry but we can’t build arrays.. So you’ll need to define as many variables as information you’d like to store for future purpose.