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
Making signal filter in separate formula
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Hi,Hello Robert,
The filter can only be implemented if written within a code.
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
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
and the tradesignals could be like this:
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
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);
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;
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
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Re: Making signal filter in separate formula
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.
That would be fantastic, since it is not very convenient to add the filters in the code.
Thanks.
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Making signal filter in separate formula
Hello, Marktwizz,
In order to use filters in your signal you need to code them in the script.
In order to use filters in your signal you need to code them in the script.