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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
DEFPARAMCumulateOrders=false
// Variables
response=20
cutoff=5
dynamicMode=1// true | false
oncecutoff=min(45,max(1,cutoff))
onceresponse=max(2,response)
oncebtm=0+cutoff
oncetop=100-cutoff
ifdynamicModethen
period=response*2//200
endif
ar=rsi[response](average[period](TypicalPrice))
resultLine=min(top,max(btm,ar))
sc1=resultline<95
sc1=sc1andresultline[2]>95
Ifsc1then
sellshort1contractatmarket
endif
Ifshortonmarketandresultline>resultline[1]then
exitshortatmarket
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 🙂
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue