Hi, I would like to do some testing on the relative bias filter posted by Maz in the indicator library. I would like to just try generating a sell signal when the result line is coming down fro
DEFPARAM CumulateOrders = false
// Variables
response = 20
cutoff = 5
dynamicMode = 1 // true | false
once cutoff = min(45, max(1, cutoff))
once response = max(2, response)
once btm = 0 + cutoff
once top = 100 - cutoff
if dynamicMode then
period = response*2 //200
endif
ar = rsi[response](average[period](TypicalPrice))
resultLine = min(top, max(btm, ar))
sc1 = resultline < 95
sc1 = sc1 and resultline[2] > 95
If sc1 then
sellshort 1 contract at market
endif
If shortonmarket and resultline > resultline[1] then
exitshort at market
endif
m the top cut off line. However I have not managed to get the code right. Is there any suggestions on solve my problems?
Your problem is that your “resultline” variable is never higher than 95, so obviously the “sc1” condition is never fulfilled and no orders are triggered 🙂