logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
PROFIT306  
#1 Posted : Monday, January 16, 2023 1:50:18 PM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

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

MS Support  
#2 Posted : Monday, January 16, 2023 4:13:27 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,927

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: PROFIT306 Go to Quoted Post

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.

Edited by user Monday, January 16, 2023 4:16:21 PM(UTC)  | Reason: Not specified

PROFIT306  
#3 Posted : Tuesday, January 17, 2023 3:47:06 AM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

Hello

It has worked.

Thanks a million

PROFIT306  
#4 Posted : Wednesday, February 1, 2023 12:42:20 PM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 

MS Support  
#5 Posted : Thursday, February 2, 2023 3:28:14 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,927

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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.

PROFIT306  
#6 Posted : Friday, February 3, 2023 4:31:49 AM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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.

MS Support  
#7 Posted : Friday, February 3, 2023 3:22:28 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,927

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

PROFIT306  
#8 Posted : Saturday, February 4, 2023 8:44:49 AM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

Hello

It works ..

Many Thanks.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

PROFIT306  
#9 Posted : Thursday, February 9, 2023 3:22:08 AM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

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 Go to Quoted Post

Hello

It works ..

Many Thanks.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

MS Support  
#10 Posted : Thursday, February 9, 2023 4:38:48 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,927

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post

Hello

It works ..

Many Thanks.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

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");

PROFIT306  
#11 Posted : Friday, February 10, 2023 9:25:55 AM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post

Hello

It works ..

Many Thanks.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

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");

MS Support  
#12 Posted : Friday, February 10, 2023 6:19:45 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,927

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post

Hello

It works ..

Many Thanks.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

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

PROFIT306  
#13 Posted : Tuesday, February 14, 2023 4:52:33 AM(UTC)
PROFIT306

Rank: Member

Groups: Registered, Registered Users
Joined: 8/11/2013(UTC)
Posts: 24
Location: MUMBAI

Was thanked: 1 time(s) in 1 post(s)

Hello

Thanks a lot.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post

Hello

It works ..

Many Thanks.

Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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 Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post
Originally Posted by: MS Support Go to Quoted Post
Originally Posted by: PROFIT306 Go to Quoted Post

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:

Code:
Cum(Fml("Profit2"))

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:

Code:
s1+s2+s3+s4+s5

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.

katesmith1304  
#14 Posted : Wednesday, April 26, 2023 6:11:14 PM(UTC)
katesmith1304

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/26/2023(UTC)
Posts: 1
Location: Delhi

How to find the energy and power of complex signals? How do you integrate complex functions like e^(ix)? I get that energy of this signal will be infinity because it will repeat up to infinity but how does the integration of that function comes out to be A^2? VidMate VidMate Download https://myfiosgateway.win/

Edited by user Thursday, February 15, 2024 1:54:13 PM(UTC)  | Reason: okay

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.