Creating a 'megaindicator' - help needed...

baton

Newbie
Messages
8
Likes
0
I'd like to create an indicator which consists of about 43 indicators...

The result of such an formula, should be a figure from -43 to +43 (43 indicators), not only a signal "+" or "-" !!

- 43 means that 43 indicators show short position + 43 opposite ... i think it's clear...

Of course I can watch all of these indicators separately, but it's hard to do in real game...

Data is 1h real-time...

Can anybody tell me how to do it?
 
In my view this would be a pointless exercise, 43 indicators is far too many to be of any use at all when trading.


Paul
 
In my view this would be a pointless exercise, 43 indicators is far too many to be of any use at all when trading.

That is not a point. Let's say only about 10 indicators ... how to write such a formula?
Can it work?
 
That is not a point. Let's say only about 10 indicators ... how to write such a formula?
Can it work?

I doubt that it would work as a trade short/trade long indicator but people do use Binary Waves as an indicator to enter trades although perhaps not based on indicators alone.

Why not try coding an indicator as you've suggested using say 5 indicators to start?

{My New Indicator}

a := If(RSI(14)>70,1,-1); {condition 1}
b := If(next indicator,1,-1); {condition 2}
c := If(next indicator,1,-1); {condition 3}
d := If(next indicator,1,-1); {condition 4}
e := If(next indicator,1,-1); {condition 5}

a + b + c + d + e

Cheers,
rnr
 
{My New Indicator}

a := If(RSI(14)>70,1,-1); {condition 1}
b := If(next indicator,1,-1); {condition 2}
c := If(next indicator,1,-1); {condition 3}
d := If(next indicator,1,-1); {condition 4}
e := If(next indicator,1,-1); {condition 5}

a + b + c + d +

Thanks a lot!!

What is this function 'condition' responsible for?
 
Thanks a lot!!

What is this function 'condition' responsible for?

{anything in these brackets is ignored by MetaStock and purely treated as a comment}

Hence { condition 1} could also read {indicator 1} or alternatively just delete them.
 
Baton, if you are convinced this is still the way to go you can save yourself some effort by categorising your indicators, all 43 of them, into classes. Which are designed to do what. You’ll find there are possibly 3 major classifications, 4 at a push.

Select the one from each category that best suits the current market, sector and instrument conditions for each instrument you are interested in.

When you’ve done that, you’ll find you don’t need and special functions or routine to calculate a score as you’ll be able to look at all 3 (or 4) inds on the same chart at the same time.

If that doesn’t appeal, take that as a sign that you’re mesmerised by indicators (we’ve all been there) and it doesn’t make any difference anyway.
 
{anything in these brackets is ignored by MetaStock and purely treated as a comment}

Hence { condition 1} could also read {indicator 1} or alternatively just delete them.

What can I do for you my friend! :)

Few more clues please:

It's still don't give a sum (-19, -3, ... 3 , 8 ...12) only a '+' or '-' , it must give a sum to work propably!

When a=1 and b= -1 it should give 0 ----> means 'NO' position ... hmmm, how to do change it?
 
Last edited:
Perhaps if you post your code for say the five indicators as mentioned earlier so that we can see where your heading?:idea:

Try and use an indicator from each different group if possible as suggested in the previous post.
 
Perhaps if you post your code for say the five indicators as mentioned earlier so that we can see where your heading?

Try and use an indicator from each different group if possible as suggested in the previous post.

I' d like to make an indicator consisting of 20 smallers indicators (f.e. : ROC, %R, STOCH, etc).
The result should by a figure from -20 to +20 (sum of all indicators)

Let's say that 15 indicators giva a signal of short position (-15)
5 for long (+5)

The result of 'magaindicator' is -10, very IMPORTANT, NOT ONLY "-" but "-10

I think it's very clear but I don't know how to write such a formula.

Please: HELP :)
 
I' d like to make an indicator consisting of 20 smallers indicators (f.e. : ROC, %R, STOCH, etc).
The result should by a figure from -20 to +20 (sum of all indicators)

Let's say that 15 indicators giva a signal of short position (-15)
5 for long (+5)

The result of 'magaindicator' is -10, very IMPORTANT, NOT ONLY "-" but "-10

I think it's very clear but I don't know how to write such a formula.

Please: HELP :)

The framework for the code is:

indicator1 := If(ROC indicator condition,1,-1);
indicator2 := If(%R indicator condition,1,-1);
indicator3 := If(STOCH indicator condition,1,-1);
indicator4 := If(another indicator condition,1,-1);
indicator5 := If(another indicator condition,1,-1);

indicator1 + indicator2 + indicator3 + indicator4 + indicator5

If for example you believe that the 14 bar RSI suggests being in a long position if the value is above 50 then the code would be

If(RSI(14)>50,1,-1);

For the moment forget using 20 indicators just use 5 and code the indicator conditions in blue to reflect the entry into a long trade and see where you end up.
 
The framework for the code is:

indicator1 := If(ROC indicator condition,1,-1);
indicator2 := If(%R indicator condition,1,-1);
indicator3 := If(STOCH indicator condition,1,-1);
indicator4 := If(another indicator condition,1,-1);
indicator5 := If(another indicator condition,1,-1);

indicator1 + indicator2 + indicator3 + indicator4 + indicator5

Isn't a result still (BUY, SELL, SELL SHORT , BUY TO COVER) in system tester ... but I need an figure, not only a signal of position.
 
For the moment forget using 20 indicators just use 5 and code the indicator conditions in blue to reflect the entry into a long trade and see where you end up

buy order
a:= If(Ref(ROC(C,3,%) > Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) > Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(C>Mov(H,13,S)AND ref(C>Mov(H,13,S),-1),1,-1); {condition 2}
d:= If(C>Mov(H,9,S),1,-1); {condition 3}
g:= if(WillR(11)>-50,1,-1); {condition 4}


a + b + d + g

sell short order
a:= If(Ref(ROC(C,3,%) < Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) < Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(Ref(Mov(L,4,S)>C,-1) AND Mov(L,4,S)>C,1,-1); {condition 2}
d:= If(Mov(L,7,S)>C,1,-1); {condition 3}
g:= if(WillR(11)<-50,1,-1); {condition 4}

a + b + d + g
 
this indicator will be awesome. Adding more indicators increases the accuracy of trades eg if macd filters 50%of bad trades and rsi filters 50% of bad trades, then add the two together and you have a 75% accurate indicator.

Why didn't I think of this before? Maybe ill add some moving averages to bump up that strike rate to 95%..... Hell, Ill chuck in a bollinger indicator as well and will take my strike rate to 100%..... im so smart.
 
buy order
a:= If(Ref(ROC(C,3,%) > Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) > Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(C>Mov(H,13,S)AND ref(C>Mov(H,13,S),-1),1,-1); {condition 2}
d:= If(C>Mov(H,9,S),1,-1); {condition 3}
g:= if(WillR(11)>-50,1,-1); {condition 4}


a + b + d + g

sell short order
a:= If(Ref(ROC(C,3,%) < Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) < Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(Ref(Mov(L,4,S)>C,-1) AND Mov(L,4,S)>C,1,-1); {condition 2}
d:= If(Mov(L,7,S)>C,1,-1); {condition 3}
g:= if(WillR(11)<-50,1,-1); {condition 4}

a + b + d + g

OK, although we have deviated from the initial question about one specifically built indicator ranging from Trade Long to Trade Short we have now got a couple of binary waves to consider.
Lets look at the next step.

buy order
a:= If(Ref(ROC(C,3,%) > Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) > Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(C>Mov(H,13,S)AND ref(C>Mov(H,13,S),-1),1,-1); {condition 2}
d:= If(C>Mov(H,9,S),1,-1); {condition 3}
g:= if(WillR(11)>-50,1,-1); {condition 4}

wavetally := a + b + d + g; {results will range from +4 to -4}
buy := wavetally>=? {change the red ? to a value from +4 to -4}

Lets apply the same logic to a sell order.

sell short order
a:= If(Ref(ROC(C,3,%) < Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) < Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(Ref(Mov(L,4,S)>C,-1) AND Mov(L,4,S)>C,1,-1); {condition 2}
d:= If(Mov(L,7,S)>C,1,-1); {condition 3}
g:= if(WillR(11)<-50,1,-1); {condition 4}

wavetally := a + b + d + g; {results will range from +4 to -4}
sell short := wavetally>=? {change the red ? to a value from +4 to -4}

Given now that you have built a new Buy Indicator & Sell Indicator try attaching these indicators to a chart (in a separate window) and compare your signals to current price trends etc. etc.

Hopefully this has been of some help.:D
 
buy order
a:= If(Ref(ROC(C,3,%) > Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) > Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(C>Mov(H,13,S)AND ref(C>Mov(H,13,S),-1),1,-1); {condition 2}
d:= If(C>Mov(H,9,S),1,-1); {condition 3}
g:= if(WillR(11)>-50,1,-1); {condition 4}

wavetally := a + b + d + g; {results will range from +4 to -4}
buy := wavetally>=? {change the red ? to a value from +4 to -4}

Lets apply the same logic to a sell order.

sell short order
a:= If(Ref(ROC(C,3,%) < Mov(ROC(C,3,%), 8,S),-1) AND ROC(C,3,%) < Mov( ROC(C,3,%),8, S),1,-1); {condition 1}
b:= If(Ref(Mov(L,4,S)>C,-1) AND Mov(L,4,S)>C,1,-1); {condition 2}
d:= If(Mov(L,7,S)>C,1,-1); {condition 3}
g:= if(WillR(11)<-50,1,-1); {condition 4}

wavetally := a + b + d + g; {results will range from +4 to -4}
sell short := wavetally>=? {change the red ? to a value from +4 to -4}

Looks fine, but ... it doen't make any transaction in system tester...
The previous code was working, but give only long-short postions, as I mentioned before, this one do not work :(
 
Top