Or am i missing something here?
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
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter short positions
indicator1, ignored = CALL "hh ll(1) highlow(2) low/high" [ 15 ]
c1 = (close > indicator1)
indicator2 = RSI [ 4 ] (close )
c2 = (indicator2 > 70 )
indicator3 = RSI [ 4 ] (close )
c3 = (highest [ 10 ] (indicator3[ 1 ] > indicator3))
IF c1 AND c2 AND c3 THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
ignored, indicator4 = CALL "hh ll(1) highlow(2) low/high" [ 15 ]
c4 = (close CROSSES UNDER indicator4)
indicator5 = RSI [ 4 ] (close )
c5 = (indicator5 CROSSES UNDER 40 )
IF c4 OR c5 THEN
EXITSHORT AT MARKET
ENDIF
The HH / LL indicator:
hil = highest [ h1] (close [ 1 ] )
lol = lowest [ h1] (close [ 1 ] )
RETURN HIL COLOURED (0 ,200 ,0 ) AS "HH" ,lol COLOURED (200 ,0 ,0 ) AS "LL"
So its basicly saying:
1. Price is higher than previous 15 highs
2. RSI 4 is above 70
3. RSI4 below the highest RSI4 for the past 10 bars.
As u can see in the photo, price is above HH (highest high past 15 candles), RSI is above 70.
But… RSI is above the highest RSI4 past 10 bars. Meaning it should not have taken the trade.
Am i missing something here or is there something wrong with PRT?
Edit: Sorry for a messy photo but the arrow to watch is the Yellow short-arrow.