A continuación, encontrará el código del filtro. Tenga en cuenta que los puntos morados y azules se trazan después y no en tiempo real.
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
28
29
30
31
32
33
34
35
36
37
38
//PRC_LastManStandingIndicator | screener
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
PeriodsInMajorSwing= 13
PeriodsInMinorSwing= 5
// --- end of settings
hhminorprice= 0
llminorprice= close * 1000
for i = 1 to PeriodsInMinorSwing* 2 do
if high [ i] > hhminorprice then
hhminorbar = barindex [ i]
hhminorprice = high [ i]
endif
if low [ i] < llminorprice then
llminorbar= barindex [ i]
llminorprice= low [ i]
endif
next
hhmajorprice= 0
llmajorprice= close * 1000
for i = 1 to PeriodsInMajorSwing* 2 do
if high [ i] > hhmajorprice then
hhmajorbar = barindex [ i]
hhmajorprice = high [ i]
endif
if low [ i] < llmajorprice then
llmajorbar= barindex [ i]
llmajorprice= low [ i]
endif
next
result = barindex - hhminorbar= PeriodsInMinorSwing or barindex - llminorbar= PeriodsInMinorSwing or barindex - hhmajorbar= PeriodsInMajorSwing or barindex - llmajorbar= PeriodsInMajorSwing
screener [ result]
1 user thanked author for this post.