Registered User Joined: 10/5/2010 Posts: 67
|
How to make sure that two conditions say A and B are triggering on the day 1.
I mean I want to buy only if they trigger first time together. Not staggered. Not like A triggers on Day 1 and B triggers on Day 4. I want them both to trigger on Day 1 together. Thank you.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The best way to do this would depend a lot on the two conditions involved.
For example, if it was something like stochastics is above its moving average and RSI is above its moving average, then create conditions for crossing up through the moving averages instead and use those to create the combo condition.
In most cases if you can create a condition for something being true, you can also create a condition for it being false. This allows you to create four conditions, two for being true and two for being false. Add all four to the same combo condition. Click on the ... for the false conditions to change them from Is True to 1 to 1 bars ago.
Another option would be to drag and drop the conditions into a RealCode Condition.
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:First True Together
'|******************************************************************
'# MC1 = chartCondition.MyCondition1
'# MC2 = chartCondition.MyCondition2
If MC1.Value = True AndAlso _
MC2.Value = True AndAlso _
MC1.Value = False AndAlso _
MC2.Value = False Then
Pass
End If
Note that this is just an example, any conditions you would drag and drop into the RealCode Condition would have different names and different variable names, but you could use this same basic structure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|