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 With the alert function:
alert(v>100000,10) Here the condition v>100000 have to be true at least once in the last 10 bars. How to code if the condition v>100000 needs to be true for more than once i.e.2 times or say three or 4 times in the last 10 bars....Is there a way to code it. Kindly guide. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 91 times Was thanked: 155 time(s) in 150 post(s)
|
Originally Posted by: PROFIT306 Hello With the alert function:
alert(v>100000,10) Here the condition v>100000 have to be true at least once in the last 10 bars. How to code if the condition v>100000 needs to be true for more than once i.e.2 times or say three or 4 times in the last 10 bars....Is there a way to code it. Kindly guide. Thanks
Hello, In this case you probably want to Sum the condition, i.e.:
After summing the condition, you can add whatever criteria you wish the sum to be greater than or equal to, such as:
Edited by user Monday, February 20, 2023 3:29:17 PM(UTC)
| Reason: Not specified
|
|
|
|
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 support.
Originally Posted by: MS Support Originally Posted by: PROFIT306
Hello With the alert function:
alert(v>100000,10) Here the condition v>100000 have to be true at least once in the last 10 bars. How to code if the condition v>100000 needs to be true for more than once i.e.2 times or say three or 4 times in the last 10 bars....Is there a way to code it. Kindly guide. Thanks
Hello, In this case you probably want to Sum the condition, i.e.:
After summing the condition, you can add whatever criteria you wish the sum to be greater than or equal to, such as:
|
|
|
|
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.