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

signal bar Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
caution
Posted : Tuesday, February 6, 2018 1:02:26 PM
Registered User
Joined: 5/5/2010
Posts: 185

Bruce,

I would like limit the signal bars on condition/charts to first signal passing 1 of last 5 bars.

 

thanks

Bruce_L
Posted : Tuesday, February 6, 2018 1:38:39 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I am not quite sure what you mean by "first signal passing 1 of the last 5 bars", but I have interpreted to mean that the condittion upon which this condition is based has not returned true in the previous 4 bars.

You will need to replace the MC based condition with your condition.

'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:First in Five
'|******************************************************************
'# MC = chartCondition.MyCondition
Static SinceTrue As Single
If isFirstBar Then
	SinceTrue = Single.NaN
End If
If MC.Value = True Then
	If SinceTrue >= 4 Then
		Pass
	End If
	SinceTrue = 0
Else
	SinceTrue += 1
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
caution
Posted : Tuesday, February 6, 2018 2:05:56 PM
Registered User
Joined: 5/5/2010
Posts: 185

so the first bar that returns true within the 1 to 5 bars should be the only signal.  instead of getting five true signal, it stops after the first true.  I get one true signal even though there are multiple.

Bruce_L
Posted : Tuesday, February 6, 2018 2:08:42 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

That may describe what I provided. I thought of several possible interpretations of that same idea. See if you like this one. If not, we can figure out why to determine what other interpretation to try next.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
caution
Posted : Tuesday, February 6, 2018 2:47:56 PM
Registered User
Joined: 5/5/2010
Posts: 185

showing multiple true signals, it should have stop checking after the first true is confirmed.  If it can't be done, thanks for the help anyway.

Bruce_L
Posted : Tuesday, February 6, 2018 3:03:49 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The RealCode should not be able to return multiple true signals in a row or even more than one true signal during any given 5 bar span. My concerns about it not matching your intent were actually that it would return too few signals compared to what you want.

Please select Help | Send Layout so technical support can take a look. Please include a description of the issue you are experiencing when sending the Layout to technical support.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
caution
Posted : Tuesday, February 6, 2018 7:46:06 PM
Registered User
Joined: 5/5/2010
Posts: 185

unrelated topic:

i'm unable to save changes to block diagram, my attempts to permantaly change main chart symbol to qqq using parameter symbol failed.  when sf5 is restarted it reverts back to main chart symbol.

Bruce_L
Posted : Wednesday, February 7, 2018 9:00:27 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Please contact technical support.



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