Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

conditions based on date of initial signal Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
krathod
Posted : Thursday, July 20, 2017 4:57:51 PM
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

Bruce_L
Posted : Thursday, July 20, 2017 5:00:34 PM


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
Al_Gorithm
Posted : Thursday, July 20, 2017 5:26:06 PM

Registered User
Joined: 6/30/2017
Posts: 1,227

You never forget your first.

krathod
Posted : Friday, July 21, 2017 11:33:42 AM
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. 

Bruce_L
Posted : Friday, July 21, 2017 11:40:29 AM


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
Users browsing this topic
Guest-1

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.