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 : 2 years ago
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

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

MS Support  
#2 Posted : 2 years ago
MS Support

Rank: Advanced Member

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

Thanks: 95 times
Was thanked: 158 time(s) in 153 post(s)
Originally Posted by: PROFIT306 Go to Quoted Post

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.:

Code:
Sum(V > 100000,10)

After summing the condition, you can add whatever criteria you wish the sum to be greater than or equal to, such as:

Code:
Sum(V > 100000,10) >= 2

Edited by user 2 years ago  | Reason: Not specified

PROFIT306  
#3 Posted : 2 years ago
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 support.

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

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.:

Code:
Sum(V > 100000,10)

After summing the condition, you can add whatever criteria you wish the sum to be greater than or equal to, such as:

Code:
Sum(V > 100000,10) >= 2

Users browsing this topic
Guest (Hidden)
Similar Topics
BUY SELL ALERT FUNCTION (Advanced Coding Techniques)
by sennal999 15 years ago
Alert function for a single event possible? Who can program this? (Formula Assistance)
by exito100 15 years ago
Frustrating Alert Function (MetaStock)
by Raymond 19 years ago
Re: Quotecenter Alert function (MetaStock)
by iphilosophise 19 years ago
Line indicator & Alert function (Formula Assistance)
by GiddyUp 19 years ago
ALERT function problem in MetaStock RT [RESOLVED] (Product Wish List)
by Mac 19 years ago
Using the Alert function (Formula Assistance)
by dieselpr 20 years ago
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.

information You have 1 unread message(s) in your Inbox.