# Create Custom Momentum Indicator

#### nhboy603

##### New Member
I have had success on other platforms (TOS, Worden) with a custom indicator that combines the values of 4 different common indicators and plots it as 1 single value. The plot is then scaled as 0-100 or -100 to 100.

Stochastics (27,3)
RSI (27)
CCI (27)
Momentum (27)

I know this has to be possible in AFL but I can't get it. Can someone help?

Cheers...

#### johnnypareek

##### Well-Known Member
I have had success on other platforms (TOS, Worden) with a custom indicator that combines the values of 4 different common indicators and plots it as 1 single value. The plot is then scaled as 0-100 or -100 to 100.

Stochastics (27,3)
RSI (27)
CCI (27)
Momentum (27)

I know this has to be possible in AFL but I can't get it. Can someone help?

Cheers...
Well, 3 is fine but momentum gives minus value too. Other three always stay in between 0-100 but momentum not so if u want to use this only absolute value , like ADX , have to be used or minus value is okay?

#### nhboy603

##### New Member
Thank you for your reply.. Here is how it was handled in another platform:
Stochastics - 50
RSI
CCI -50
Momentum

The values are all averaged together. Does that help

#### johnnypareek

##### Well-Known Member
Thank you for your reply.. Here is how it was handled in another platform:
Stochastics - 50
RSI
CCI -50
Momentum

The values are all averaged together. Does that help
HTML:
``````_SECTION_BEGIN("Momentum");
function Momentum( array, period )
{
return array - Ref( array, -period );
}

mom=abs(Momentum( C, 27 ));

_SECTION_END();
sto=StochK(27,3);
RSI27=RSI(27);
Cc=CCI(27);
final=(sto+RSI27+Cc+mom)/4;

Plot(final,"Combined",5,1+4);``````
chk this

#### nhboy603

##### New Member
Thank you very much... I will check this.

#### nhboy603

##### New Member
This looks good!

One more question ,if I may --

How do I plot a horizontal line at a fixed value -- say at 50?

#### johnnypareek

##### Well-Known Member
This looks good!

One more question ,if I may --

How do I plot a horizontal line at a fixed value -- say at 50?
HTML:
``````_SECTION_BEGIN("Momentum");
function Momentum( array, period )
{
return array - Ref( array, -period );
}

mom=abs(Momentum( C, 27 ));

_SECTION_END();
sto=StochK(27,3);
RSI27=RSI(27);
Cc=CCI(27);
final=(sto+RSI27+Cc+mom)/4;

Plot(final,"Combined",5,1+4);

Plot(50,"",5,1+4);
Plot(-50,"",4,1+4);``````
50 and -50 lines ploted. This is just so you can quick chk .

now to do it ur self. Right click on indicator>parameter>axis>levels here u can select what value u need

hope it will help.

johnny