This is a simple price action indicator made for detecting sudden price movement for quick in and out trading (scalping).
You can select the way the signal line is calculated (CalcMethod = different type of moving averages) and on how many periods the price is analyzed (CalcPeriod = 50 periods by default).
Translated from a MT4 indicator.
//PRC_Price Action oscillator | indicator
//01.09.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//translated from MT4 code (author:mladen)
// --- settings
//CalcPeriod = 50 // Calculation period
//CalcMethod = 2 // Moving Average type
trad// --- end of settings
Price = customclose // Price to use
av = average[CalcPeriod,CalcMethod](Price)
ma = Close+Open-2*av
av = Open-av
if ma>av then
r=50
g=205
b=50
else
r=255
g=69
b=0
endif
RETURN av coloured(100,100,100) style(dottedline),ma coloured(r,g,b) style(line,3)