Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Create Combo Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tnmc77
Posted : Thursday, March 3, 2011 12:25:53 PM
Gold Customer Gold Customer

Joined: 11/22/2008
Posts: 23
Hi,
I use SF4. I have several conditions and want to create a combo as follows. I tried all three choices but was unable to do it. It is the false part where I am having trouble. TIA.
tnmc

Condition A is false
AND
condition B is true
Bruce_L
Posted : Thursday, March 3, 2011 12:38:22 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I would seriously consider just creating a Rule for Condition A being False from scratch as Combo Rules do not have a built in way to check if a Rule is False.

That said, if you Dragged and Dropped a Rule called Condition A and a Rule called Condition B into the Code tab of the RealCode Editor of a RealCode Rule, it would create something similar to the first two lines of the following RealCode Rule which would do what you want:

Writing Conditions in RealCode

'# CA = condition.ConditionA
'# CB = condition.ConditionB
If CA.Value = False AndAlso CB.Value = True Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tnmc77
Posted : Thursday, March 3, 2011 2:33:18 PM
Gold Customer Gold Customer

Joined: 11/22/2008
Posts: 23
Thanks. I get the following. All 4 conditions are identified as same CC, how do I proceed.
Thanks.

'# CC = condition.ComboCondition.11
'# CC = condition.ComboCondition.17
'# CC = condition.ComboCondition.18
'# CC = condition.ComboCondition.23
tnmc77
Posted : Thursday, March 3, 2011 2:44:11 PM
Gold Customer Gold Customer

Joined: 11/22/2008
Posts: 23
Never mind. I think I got it.
Bruce_L
Posted : Thursday, March 3, 2011 2:45:12 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You can change the variable names (and have to do so if you get more than one Indicator or Rule with the same variable name). For example, I could have manually changed my original example:

'# CA = condition.ConditionA
'# CB = condition.ConditionB
If CA.Value = False AndAlso CB.Value = True Then Pass

To:

'# First = condition.ConditionA
'# Second = condition.ConditionB
If First.Value = False AndAlso Second.Value = True Then Pass

I have no idea what you are planning on doing with your four imported Rules, but you can pretty much use any Variable name you want as long as it starts with a letter, has at least two characters and no reserved symbols.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tnmc77
Posted : Thursday, March 3, 2011 2:47:41 PM
Gold Customer Gold Customer

Joined: 11/22/2008
Posts: 23
I solved the above issue but get the error that nmae Pass is not declared.
TIA
tnmc
Bruce_L
Posted : Thursday, March 3, 2011 2:54:50 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Pass is only Valid as part of a RealCode Condition (SF5) or RealCode Rule (SF4). It reads like you are attempting to use it as part of a RealCode Indicator.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tnmc77
Posted : Thursday, March 3, 2011 3:05:12 PM
Gold Customer Gold Customer

Joined: 11/22/2008
Posts: 23
Got it all. Thank you, Sir for your help.
tnmc
Bruce_L
Posted : Thursday, March 3, 2011 3:07:48 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

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