Generator (oscillator with user defined variable formula)

 

So I just though it would be an interesting idea to have an indicator, where user could enter formula dynamically and see the result without recompilation.

Also I added the feature to have 8 oscillators all together in one in indicator window, each can be choosed to be displayed or not.

the formula is like this

VARS: has to be string of consequitive letters of {H,L,O,C}

OPTS: has to be spaceless string of any 3 signes of the set {+,-,/,*}

the setting of:

VARS= CLOH

OPTS= +/+

will be interpreted as formula INDICATOR=(Close+Low)/(Open+High)

so this means that after each letter VARS there would be a sign inserted, reading from left to right.

example 2:

VARS= LOHC

OPTS= */*

=> Indicator formula = (Low*Open)/(High*Close)

I hope some of you will find this tool useful! I'm also looking forward for your collaboration.

Files:
generator.mq4  15 kb
Reason: