I started using/coding PRT last month, so please be kind. This is my first indicator, good for entry/exit positions.
Based on Bollinger Bands percentage width, it gives signals when bands are exiting from previous contraction periods.
MyBoll = (close[0] - BollingerDown)/(BollingerUp - BollingerDown)*100
MyBoll2 = (high[0] - BollingerDown)/(BollingerUp - BollingerDown)*100
MyBoll3 = (Low[0] - BollingerDown)/(BollingerUp - BollingerDown)*100
X = (myBoll2[0] + myBoll2[1] + myBoll2[2]) /3
Y = (myBoll3[0] + myBoll3[1] + myBoll3[2]) /3
rge = averagetruerange[10](close)
if MyBoll >= 50 THEN
upBoll = X > 100
downBOLL = 0
ELSE
upBOLL = 0
downBOLL = Y < 0
ENDIF
If upBOLL[1] > 0 and upBOLL = 0 then
DRAWARROWDOWN(barindex[1],high[1]+rge)coloured(249,0,224)
endif
if downboll[1] > 0 and downboll = 0 then
DRAWARROWUP(barindex[1],low[1]-rge)coloured(0,249,45)
endif
RETURN
You must be logged in to post a comment.
Hi I was wondering if it would be possible to get an alert (by sound) when the signals shows up in the chart?
Hi Vicormork, i´am sorry - but it still doesn´t work. I can´t correct the error. Prorealtime still say´s Syntax Error L20 Z18. I need help. Best reagards
sorry the code keep on changing when I press post comment. Basically you have to complete the SHORT section the same way as I done with the long. I've tried one final time below. s1 = s1 and close 0 s2 = s2 and downboll = 0
It didn't work using the add PRT code button. I'll try again without it. //SHORT // Sell signal s1 = not onmarket s1 = s1 and currenttime > 120000 and currenttime 0 s1 = s1 and upBOLL = 0 s1 = s1 and close 0 s2 = s2 and downboll = 0 If s2 then exitshort at market endif
Hi Victormork, Your Code doesn´t work on PRT 10.3 (Syntaxfehler R20 Type 18)
Hi! I'm using 10.3 myself so that's not the problem. I think the problem are the last lines in the code. they should be like this:
No it's not complete. Stop target and proper testing is missing. I just wrote it to show whoever asked about trading this in a strategy how it might look in a coded system. I tested it on dax. Not a very good return but it's not terrible either. It's on plus for several timeframes. Think the return can be much better with some more research.
Hi, If anyone would like to try using this indicator for entry/exit you can use a code similar to this. I tried on dax but you can change to whatever you want. DEFPARAM cumulateorders = false DEFPARAM flatbefore = 080000 DEFPARAM flatafter = 220000 MA1 = average[25] MA2 = average[25] MyBoll = (close[0] - BollingerDown)/(BollingerUp - BollingerDown)*100 MyBoll2 = (high[0] - BollingerDown)/(BollingerUp - BollingerDown)*100 MyBoll3 = (Low[0] - BollingerDown)/(BollingerUp - BollingerDown)*100 X = (myBoll2[0] + myBoll2[1] + myBoll2[2]) /3 Y = (myBoll3[0] + myBoll3[1] + myBoll3[2]) /3 if MyBoll >= 50 THEN upBoll = X > 100 downBOLL = 0 ELSE upBOLL = 0 downBOLL = Y 120000 and currenttime 0 b1 = b1 and downboll = 0 b1 = b1 and close > MA1 If b1 then Buy 1 contract at market endif // sell signal b2 = longonmarket b2 = b2 and upBOLL[1] > 0 b2 = b2 and upBOLL = 0 if b2 then sell at market endif //SHORT // Sell signal s1 = not onmarket s1 = s1 and currenttime > 120000 and currenttime 0 s1 = s1 and upBOLL = 0 s1 = s1 and close 0 s2 = s2 and downboll = 0 If s2 then exitshort at market endif
Hi, i like this bollinger moz arrwos. How can I use this indicator in an screener? I want to screen all shares with an green arrow within the last 3 bars.