# Need help combining 3 oscillator's values into one value

I want to combine RVI Signal(1) (PERIOD_CURRENT), CCI(PERIOD CURRENT) and Chaikin(PERIOD_M1) into one value and turn it into an indicator. I have never coded an indicator and I need help. Please point me in the right article to read, or code it and paste it if you feel so kind. :D

Timeframe of the Chaikin must remain M1 so it doesn't screw up the averaging. (Chaikin + CCI + (RVI * 100)) / 3 is the calculation I'm trying to accomplish. I need to be able to adjust the period, pricng, methods, etc of each indicator besides RVI Signal. RVI Signal stays 1. I won't be using the actual RVI main line.

I also want to combine other indicators, but learning how to do this first will teach me "to fish". 🎣🙏

Why does every newbie coder always want to start by coding something way too difficult for their own skill-set?

If you want to learn how to "fish", start by learning about the "fish" itself. Start, by looking at the CodeBase examples to see how a basic indicator is coded, for example a moving average. All this while referencing the documentation for a more detailed understanding.

Then study the indicators you wish to use. Learn how the RVI, CCI and Chaikin work and are coded. Understand them completely so that you will know whether or not they can be combined. Don't just assume that they can. Make sure of it and make sure you know how mathematically before even considering the code itself.

Fernando Carreiro #:

Why does every newbie coder always want to start by coding something way too difficult for their own skill-set?

If you want to learn how to "fish", start by learning about the "fish" itself. Start, by looking at the CodeBase examples to see how a basic indicator is coded, for example a moving average. All this while referencing the documentation for a more detailed understanding.

Then study the indicators you wish to use. Learn how the RVI, CCI and Chaikin work and are coded. Understand them completely so that you will know whether or not they can be combined. Don't just assume that they can. Make sure of it and make sure you know how mathematically before even considering the code itself.

Understandable response.. Thank you. I'll google the CodeBase. (edit: I found the codebase tab in the editor, wow I am a newbie)

To answer your question, why does any newbie to any medium want to do anything? Without that desire, they probably won't even bother. There's always a steep learning curve to everything.

So I can just snag the code I want from each and combine that? (if it's that simple) 👍.

Nicholas C Weber:

I want to combine RVI Signal(1) (PERIOD_CURRENT), CCI(PERIOD CURRENT) and Chaikin(PERIOD_M1) into one value and turn it into an indicator. I have never coded an indicator and I need help. Please point me in the right article to read, or code it and paste it if you feel so kind. :D

Timeframe of the Chaikin must remain M1 so it doesn't screw up the averaging. (Chaikin + CCI + (RVI * 100)) / 3 is the calculation I'm trying to accomplish. I need to be able to adjust the period, pricng, methods, etc of each indicator besides RVI Signal. RVI Signal stays 1. I won't be using the actual RVI main line.

I also want to combine other indicators, but learning how to do this first will teach me "to fish". 🎣🙏

Create an indicator mql5

Use iRVI, iCCI, iChaikin or iCustom to get the handle of any indicator. There are time frame, method, period, and other parameters to be adjusted in those functions definition. Use CopyBuffer to get values of handles. You get the values, so calculate the average. Also check the functions return in case of failure or error.

_MAHA_ #:

Create an indicator mql5

Use iRVI, iCCI, iChaikin or iCustom to get the handle of any indicator. There are time frame, method, period, and other parameters to be adjusted in those functions definition. Use CopyBuffer to get values of handles. You get the values, so calculate the average. Also check the functions return in case of failure or error.

Thank you. This saves me a lot of time.

Orchard Forex on youtube helped, plus a friend showed me some stuff. Arrays and for Loops and such. lots to learn for a custom indicator, but it was worth it! I ended up scrapping half of my ideas after seeing how they looked combined. But one I really like is the Triple TEMA I made. Fibonacci numbers and stuff.

Some indicators don't fit together because they have different scales. Some 0-100 others don't, some are in the thousands, some in the one digits department.
When you think about it from a physical/ mathematical perspective: once you have a different formula it is also mostly a different unit, so it will be like mixing apples and oranges.

Tobias Johannes Zimmer #:
Some indicators don't fit together because they have different scales. Some 0-100 others don't, some are in the thousands, some in the one digits department.
When you think about it from a physical/ mathematical perspective: once you have a different formula it is also mostly a different unit, so it will be like mixing apples and oranges.

Chaikin is a good example of an indicator that doesn't play well with others. on the M1, it's range is 2 to 3 digits. on the H1 it's range is easily 4 digits. I am aware of this issue. The issue I had was lack of coding knowledge. RVI, MACD, indicators with 1/1000ths of a value would need to be multiplied in the equation to be valid, too. Nothing a little calculation can't fix.

Nicholas C Weber: I want to combine …
Nicholas C Weber #: The issue I had was lack of coding knowledge

Until you can state your requirements in concrete terms, it can not be coded. All you have is a vague want.

William Roeder #:

Until you can state your requirements in concrete terms, it can not be coded. All you have is a vague want.

Yes, indeed very vague.

To OP: They won't magically combine when you code them into one program although you can always just for practice display them in one window if you insist, just declare and initialise enough buffers.
Look into Indicators/Examples how it is done in MACD code for starters.

But who knows, maybe you have an idea about how to calculate and put the parts together that brings an edge.
Reason: