Registered User Joined: 4/12/2008 Posts: 41
|
I want to create a rule that works as a trailing stop to apply in Back Scanner, 1. Im defining the first part of the trailing stop as follows: IF Price.MinLow(5, 1) > price.low Then pass2. The complicated part is, I want to trigger that stop ONLY if its > than the Price.Open of the next bar of the rule I used as a Buy signal. In other words, the trailing stop should be triggered only if > entry price. If the Buy rule were the following, whats the syntax for the entire trailing stop rule: Rule used as a Buy in Back Scanner: If price.close > price.close(1) then passPs: I suppose I have to name a single variable “entryprice” for the Buy rule, (I dont know how exactly) and then: something like IF price.low > “entry price” then passA million thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I do not know of a way to access the Entry Price of the Trade in a generalized fashion in a RealCode Rule or in anything besides one of the built in Trade Based Rules.
You pretty much need to re-create the entire BackScan in RealCode to know the Entry Price to use it in RealCode. This is rarely practical as the RealCode required can be very complicated and any changes to the BackScan would require similar alterations to the RealCode as well.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|