Login Page - Create Account

Support Board


Date/Time: Wed, 22 Jan 2025 06:50:09 +0000



Post From: MQL to Sierra Charts - Dev needed

[2018-09-05 22:16:46]
DaxTrader54 - Posts: 8
Thank you all for the messages so far, I now realise that I have literally provided no clues as to what I am looking for. This was my error.

Here is a screenshot of the indicator I would like to rebuild for sierra. It is an RSI Divergence indicator.
https://www.screencast.com/t/ASXjkIYSES

The only inputs are
- RSI period
- Number of bars/history to include in the loop

The calculation method for the divergence is based on peaks/troughs of price action and the peaks/troughs of the RSI oscillator reading.
Regular Bullish Divergence = Lower Low on price, but Higher Low on the oscillator
Regular Bearish Divergence = Higher High on price, but Lower High on the oscillator

A priceActionPeak() finds a high by starting with candle[-3] and scanning to make sure that its high is higher than the highs of two candles either side, so H[-5],H[-4],H[-2],H[-1]
A priceActionTrough() finds a Low by starting with candle[-3] and scanning to make sure that its Low is lower than the lows of two candles either side, so
L[-5],L[-4],L[-2],L[-1]

Once it locates a price action Peak or Trough, the MT4 indicator checks the oscillator peaks and troughs for the same period and checks if there is regular divergence.

The indicator displays RSI oscillator and it displays the instances of 'regular bullish RSI divergence' and 'regular bearish RSI divergence' by drawing the objects on the chart. It provides approx 2000 candles of history.

Hope that made sense...