Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Originally Posted by: PROFIT306 Hello
Many thanks for the help.It is working very well and giving the required probability for simple analysis. Now ,I have total of 21 "fml"s which i have added in column A of the exploration. If the result is the number say 10 or 11 or whatever,how to know which of the "fml"s have generated the signals out of 21 "fml"s? Is there a way to print /know/get these details in the same exploration? Kindly guide. Thanks in advance.
Originally Posted by: MS Support Originally Posted by: PROFIT306
Hello Thanks for all the help. Now I have total 10 signal formulas in exploration columns and i do not wish to put them in one single column of exploration i.e
colA- s1+s2+s3+s4+s5;
colB-s6+s7+s8+s9+s10;
I want to have total of colA +colB (colA+colB), How to get this coded. Kindly guide. Thanks
Originally Posted by: PROFIT306
Hello It works .. Many Thanks.
Originally Posted by: MS Support Originally Posted by: PROFIT306
Hello Sorry I could not convey/write properly. I wanted to ask: If the total of (s1+s2+s3+s4++s5)>2 then generate true i.e 1 else false i.e 0, a) Here,the total could be 3,4 or 5 if the signals are more than 2. How to print this digit 3,4 or 5 instead of true 1, (Here we will come to know the number of signals generated on that day) b) else ,the total could be 0,1 or 2 if the signals are <=2 In this case how to print the digit 0,1 or 2 instead of false i.e 0
I hope i am able to convey rightly. Kindly guide. Thanks
Originally Posted by: MS Support Originally Posted by: PROFIT306 Originally Posted by: MS Support Originally Posted by: PROFIT306
Hello I have written five simple indicator signals named profit1,profit2, profit3.profit4 and profit5. I want to write one indicator when more than 2 signals are generated out of above. I have written like this: t1:=0; t2:=t1+1; s1:=fml(profit1"); s2:=fml(profit2");
s3:=fml(profit3");
s4:=fml(profit4");
s5:=fml(profit5");
if(s1,t2,t1); if(s2,t2,t1); if(s3,t2,t1); if(s4,t2,t1); if(s5,t2,t1); if(t2>2,1,0); t2;
However i am not getting the result as expected. Can anyone guide me. Thanks in advance
The IF function parameters are IF(Expression,Then Data Array,Else Data Array) but it is not designed to work like a counter, adding values to an existing variable, it simply returns the value of Data Array(T2) when each profit is true, else Data Array(T1) when each profit is not true.
I don't think you really need T1 or T2 in this case. Assuming your profit signals return a value of 1 when true and 0 when not true, you could simply write your IF statement as follows: Code:s1:=fml(profit1");
s2:=fml(profit2");
s3:=fml(profit3");
s4:=fml(profit4");
s5:=fml(profit5");
If(s1+s2+s3+s4+s5>2,1,0)
Since the sum of all your conditions must be greater than 2, by adding all the conditions together, you will get a signal when at least 3 of your "profit" signals are true.
Hello It is working great... Is there a way to know/code how many signals have been generated like 3,4 or 5 and get the figure in exploration. Kindly guide. Thanks
Hello, Did you mean the total number of times a signal has occurred within a given amount of data? You can use the Cumulative function. For example:
Note, the above formula is dependent upon how much data you load into the Exploration. If you use "Load Minimum Records" then this formula will only calculate on the minimum amount of data needed to calculate. If you use X number of records, then this formula will look over X periods to determine how many times the signal has triggered.
Hi again, You could use a single explorer column for this, or you could have 2 separate formulas in 2 separate columns. For a single column you would use what would be called a "nested IF" statement.
Code:If(s1+s2+s3+s4+s5 > 2,s1+s2+s3+s4+s5,If(s1+s2+s3+s4+s5 <= 2,s1+s2+s3+s4+s5,0))
It should be noted that in the above case your IF statement isn't really excluding anything so you could simply use:
Hello again, There is a COL variable that allows you to reference other columns (just as you describe, colA+colB). However, this only works in the Filter tab. You cannot use the COL variable inside other columns. Assuming you do not want to use the Filter column, you would need to rewrite all the formulas into a new column. For example: Code:s1:=fml("profit1");
s2:=fml("profit2");
s3:=fml("profit3");
s4:=fml("profit4");
s5:=fml("profit5");
s6:=fml("profit6");
s7:=fml("profit7");
s8:=fml("profit8");
s9:=fml("profit9");
s10:=fml("profit10");
s1+s2+s3+s4+s5+s6+s7+s8+s9+10
Keep in mind there is a maximum number of variables per formula (20 max variables) but you don't necessarily have to use variables either, you could simply use the fml formulas directly, i.e.: Code:fml("profit1")+fml("profit2")+fml("profit3")+fml("profit4")+fml("profit5")+fml("profit6")fml("profit7")+fml("profit8")+fml("profit9")+fml("profit10");
Hi again, You could do this by using a larger number of columns, and labeling each column, i.e.: Prof1+2
Prof3+4
Prof5+6
Prof7+8 and so on. Then within each column you would do the following:
Code:If(Fml("profit1") AND Fml("profit2")=0,1,If(Fml("profit1")=0 AND Fml("profit2"),2,If(Fml("profit1") AND Fml("profit2"),3,0)))
Code:If(Fml("profit3") AND Fml("profit4")=0,1,If(Fml("profit3")=0 AND Fml("profit4"),2,If(Fml("profit3") AND Fml("profit4"),3,0)))
and keep repeating this same formula pattern for all your profit combinations. It's possible you could combine more profit signals into less columns, but it would require more elaborate numerical outputs and could get more confusing to keep track of. Depending on how many other Columns you are using it may be difficult to fit all 21 profit signals listed. But if you had 11 free columns, then the formulas above would be able to handle them all. So basically if the 1st formula per column was true you would get a 1 value. If the 2nd formula was true you would get a 2 value. If both formulas were true you would get a 3 value. If neither formula was true you would get a 0 value. Edited by user Friday, February 10, 2023 6:21:11 PM(UTC)
| Reason: Not specified
|