Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/5/2010 Posts: 67
|
Hi there,
I want to write a buy condition that is triggered not only by certain indicators but also when the date of the conditions are first true. I would not want to be shown an initial buy signal multiple days later.
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
So only the first time ever in the entire history of the stock? If this is not what you mean, what resets things it can be the "first" time again?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
You never forget your first.
|
|
Registered User Joined: 10/5/2010 Posts: 67
|
Thanks for the qs.
Here's an example of what I'm trying to figure out:
I see the signal on day 1. It's true day 2 and day 3. But then the signal stops days 4-9. The signal occurs again day 10-15.
I want to create a condition where I only identify the first day of the signal [so days 1 + 10]. The other days should be excluded.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Let's say you have a condition called My Condition and you want it to only return true if it is true now but not true during the previous bar.
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:First True
'|******************************************************************
'# MC = chartCondition.MyCondition
If MC.Value = True AndAlso MC.Value(1) = False Then
Pass
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |