Making signal filter in separate formula

Questions about MultiCharts and user contributed studies.
User avatar
gautama2
Posts: 96
Joined: 10 Jul 2007
Has thanked: 1 time
Been thanked: 1 time

Making signal filter in separate formula

Postby gautama2 » 25 Sep 2007

Hello,

i can add signals to use several entry- and exit conditions.
But is it possible to also make filters?

For example i would like to hava a MA Cross signal and then add a filter condition/formula the same way as i can add several stop- or other entrysignals.

It would then be possible to check several filters with an entrycondition without making a lot of entryformulas with different filters "inside".

Is this already possible with PowerLanguage (and if yes, how?) or could you please consider to make it possible? When creating a new formula i can choose between making indicator, signal and function. Maybe you could also make possible to choose filter in this window.

Filter could look like this:

buy only if RSI(14) > 50;
sellshort only if RSI(14) < 50;

Maybe just the word "only" would need to be implemented to let MC know that a filter condition is meant.

Regards
Robert

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 27 Sep 2007

Hello Robert,

The filter can only be implemented if written within a code.

User avatar
gautama2
Posts: 96
Joined: 10 Jul 2007
Has thanked: 1 time
Been thanked: 1 time

Postby gautama2 » 28 Sep 2007

Hello Robert,

The filter can only be implemented if written within a code.
Hi,
do you have any intention to change this?
You can have a look at www.fipertech.de. The software Dynamite Sentimentor makes it possible to also insert filters and this is very useful for me.
As i like to use MC because it has better formula language, i would appreciate to have easily addable filters also in MC.

Regards
Robert
Attachments
tssmc03.png
(32.88 KiB) Downloaded 1195 times

User avatar
gautama2
Posts: 96
Joined: 10 Jul 2007
Has thanked: 1 time
Been thanked: 1 time

Postby gautama2 » 30 Oct 2007

Hello,

i found a possibility to make a "filtersignal" that just in case that the filtercondition, defined in the signalcode is true, sets a global variable to 1.
Then every signalcode can look, if a global variable for filter is true and in this case does not send a tradesignal.
This way it could be possible to write filters like signals

Code: Select all

filtercondition = Average(C, 5) > Average(C, 10);
if filtercondition then
GVSetNamedInt("BuyFilter"+getsymbolname, 1)
else GVSetNamedInt("BuyFilter"+getsymbolname, 0);
and the tradesignals could be like this:

Code: Select all

buycondition = RSI(C, 14) crosses above 50;
if buycondition = 1 and GVGetNamedInt("BuyFilter"+getsymbolname,0)=0 then begin
buy("LE RSIx50") next bar open;
PlaySound("C:\Programme\TS Support\MultiCharts\strategy alert.wav");
end;
I just need info how the global filter variable is handled with several different filters. Example: If i create 3 filters and 2 are false and one is true, which value does the filter variable get?
Does it depend on which filtersignal writes last into the global variable or do i in all cases get a true value for the filter if at least 1 filter is true, like it is the case with regular buy and sell signals?

Regards
Robert

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 31 Oct 2007

Dear Robert,

I will need to consult our software engineers and as soon as I have an answer I will post it on the forum.

Regards.

User avatar
gautama2
Posts: 96
Joined: 10 Jul 2007
Has thanked: 1 time
Been thanked: 1 time

Postby gautama2 » 31 Oct 2007

Dear Robert,

I will need to consult our software engineers and as soon as I have an answer I will post it on the forum.

Regards.
Thank you.
As far as i can see it works also with several filters.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 01 Nov 2007

Hi Robert,

If you have questions again just let us know.

Regards.

Marktwizz
Posts: 10
Joined: 18 Aug 2016
Has thanked: 1 time
Been thanked: 1 time

Re: Making signal filter in separate formula

Postby Marktwizz » 03 Nov 2018

I would like to ask the same question as the original topic: is it possible in this version of Multicharts to add filters on the top of signals in a separate way?
That would be fantastic, since it is not very convenient to add the filters in the code.
Thanks.

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Making signal filter in separate formula

Postby Svetlana MultiCharts » 05 Nov 2018

Hello, Marktwizz,

In order to use filters in your signal you need to code them in the script.


Return to “MultiCharts”