Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please contact technical support.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |