This indicator send trading signals according to 3 different scenarios built with 2 moving average from different periods and from a short and a long term stochastic.
Indicator converted from MQL4 code by a request in the English forum section.
//PRC_Scalper Indices | indicator
//14.11.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//translated from MQL4 code
TODFromHour = 080000 //time of the day
TODToHour = 200000 //time of the day
inTimeInterval = time>=TODFromHour and time<TODToHour
//short term stochastic
sto = stochastic[5,3]
//long term stochastic
stol = stochastic[233,1]
ma100 = average[100,2](close)
ma50 = average[50,2](close)
//atr = averagetruerange[14]
if inTimeInterval and barindex>233 then
if sto<15.1 and close>ma100 then
drawtext("▲",barindex,low-2*pointsize) coloured(0,170,255)
endif
if sto>84.9 and close<ma100 then
drawtext("▼",barindex,high+2*pointsize) coloured(255,204,0)
endif
if stol>47.99 and sto<15.1 and close>ma100 then
drawtext("▲",barindex,low-3*pointsize) coloured(0,255,9)
endif
if stol<52.01 and sto>84.9 and close<ma100 then
drawtext("▼",barindex,high+3*pointsize) coloured(255,0,0)
endif
if stol>52.01 and sto<10.1 and close>MA100 and close>MA50 then
drawarrowup(barindex,low-4*pointsize) coloured(102,255,0)
endif
if stol<52.01 and sto>89.9 and close<MA100 and close<MA50 then
drawarrowdown(barindex,high+4*pointsize) coloured(255,0,0)
endif
endif
return MA100 coloured(100,100,100) style(line,2) as "long term MA", MA50 coloured(100,100,100,100) style(line,1) as "short term MA"