Created an oscillator from two LWMA indicators (Period 5 and Period
GBPUSD). The formula is: ((FastLWMA-SlowLWMA)/SlowLWMA)*100. I'm
this calculated value for the further processing which is described
1. Trying to find local maximum and minimum values using previous
three and the current
oscillator values. If all the previous values are higher than the
preceeding ones and the current value lower than the
previous one at least by 10percent, then the oscillator had a local
maximum. The logic is same for findind local minimum oscillator
2. If the local maximum value is found then it's time to SELL. If the
local minimum value is found then it's time tu BUY.
3. I do not need to use TP or Stoploss because the strategy just
closing the current position before opens the opposite one.
4. Trade volume calculation: