Coding help - page 184

 
kenwa:
hi mladen,

sorry to trouble you again,

i cannot convert the attached one to rsi version of it, quite complicate for me

also is the following link indicator(different from dpo before)

DiNapoli Price Oscillator - MQL4 Code Base

i try myself without success, could you kindly help me to convert them to rsi version?

thank you a lot for your help.

It is using 8 buffers already

That indicator would need to be rewritten completely in order to do what you usually do to make a rsi of that value

 
mladen:
It is using 8 buffers already That indicator would need to be rewritten completely in order to do what you usually do to make a rsi of that value

hi mladen, i trial a version, you will feel amuse for my coding level inside, I try to reduce two buffers to allow me to calculate rsi for main and signal, of course not work ; for the Dinapoli PO, Detrended Price Oscillator.mq4 - MQL4 Code Base, though only 1 buffer used, i also do not know how to rsi it. (seems two cases within) Could you help rsi them? Thank you a lot.

Files:
testcci2.mq4  4 kb
 
kenwa:
hi mladen, i trial a version, you will feel amuse for my coding level inside, I try to reduce two buffers to allow me to calculate rsi for main and signal, of course not work ; for the Dinapoli PO, Detrended Price Oscillator.mq4 - MQL4 Code Base, though only 1 buffer used, i also do not know how to rsi it. (seems two cases within) Could you help rsi them? Thank you a lot.

You can not use iMAOnArray(iMAOnArray()) way

First argument of iMAInArray is array not a double value (which is the result of calling iMAOnArray()) so you are trying to calculate iMAOnArray of a wrong data type

__________________________________

double iMAOnArray(double array[], int total, int period, int ma_shift, int ma_method, int shift)

Calculation of the Moving Average on data stored in a numeric array. Unlike iMA(...), the iMAOnArray function does not take data by symbol name, timeframe, the applied price. The price data must be previously prepared. The indicator is calculated from left to right. To access to the array elements as to a series array (i.e., from right to left), one has to use the ArraySetAsSeries function. Parameters:

array[] - Array with data.

total - The number of items to be counted. 0 means whole array.

period - Averaging period for calculation.

ma_shift - MA shift

ma_method - MA method. It can be any of the Moving Average method enumeration value.

shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

 

Thanks mladen, but i do not know how to do, may i request in the rsi indicator section? thanks again.

 
kenwa:
Thanks mladen, but i do not know how to do, may i request in the rsi indicator section? thanks again.

This is a version of FX sniper's ergodic CCI that uses only 2 buffers. You can easily add RSI calculation to it now

 

mladen,

you are great, can so simplify the complex codes, though i do not understand much inside what you have done, but can see much much simplify it inside.

 

hi mladen

i try myself on dpo , has display, but i do not use standard i limit sentence etc, could you improve it because i code it i think in a silly way , any syntax or logic problems, please fix or improve some of it inside, many thanks again.

Files:
 
kenwa:
hi mladen i try myself on dpo , has display, but i do not use standard i limit sentence etc, could you improve it because i code it i think in a silly way , any syntax or logic problems, please fix or improve some of it inside, many thanks again.

kenwa

As far as I see it works as it should

f course that it can be optimized (every code can and every mans code can - even my can be further optimized) but that comes slowly with time

happy coding

 

mladen

i just do not know how to optimize using standard i limit sentence inside. I do it by trial & error without much understanding its mechanism. as told you before i am only a copy & paste type coding beginner.

 
kenwa:
mladen i just do not know how to optimize using standard i limit sentence inside. I do it by trial & error without much understanding its mechanism. as told you before i am only a copy & paste type coding beginner.

This would be the simplest way to do that

Files: