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 |

changing the default Sort configuration Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
pipeacosta
Posted : Monday, July 20, 2009 2:47:56 PM
Registered User
Joined: 4/12/2008
Posts: 41
I Draged n Droped a rule in the main wacht list, then I can sort by " % true in a period" . Can I modify this for: "# true in a period" ?Ps: Im very thankfull for all the answers given to me, thay have been very helpfull. Can I rate the answers given to me as a recognition for youre excellent work and to express my satisfaction ?
Bruce_L
Posted : Monday, July 20, 2009 3:19:25 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
That is not one of the Drag and Drop options currently available. You could create a RealCode Indicator for this and Drag and Drop it to the Watchlist and select Raw Value if you really want this however. Dragging and Dropping the Rule into the RealCode Editor would create something similar to the first line of the following RealCode Indicator (you may need to change the variable name if something besides MR is assigned):

'# MR = condition.MyRule
'# Period = UserInput.Integer = 50
Static Count As Integer
If isFirstBar Then
    Count = 0
End If
If MR.Value = True Then
    Count += 1
End If
If CurrentIndex >= Period Then
    If MR.Value(Period) = True Then
        Count -= 1
    End If
    Plot = Count
Else
    Plot = Single.NaN
End If

You can rate the topic as a whole by selecting 1, 2, 3, 4 or 5 stars where it says Rate this Topic in the upper right hand corner of the topic, but I do not know of an automated mechanism for rating the answers or individual posts within a topic.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pipeacosta
Posted : Monday, July 20, 2009 10:56:22 PM
Registered User
Joined: 4/12/2008
Posts: 41
I copyed and pasted the sintax in a new indicator RC but, an error appeared, twice:Name 'MR' is not declared .PS: I didn't understand this part of your answer: "Dragging and Dropping the Rule into the RealCode Editor would create something similar to the first line of the following RealCode Indicator:"Help !
Bruce_L
Posted : Tuesday, July 21, 2009 10:22:30 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
- Select Add Indicator | Create in RealCode.
- Give the Indicator a Name and select OK.

I'm assuming your Watchlist Column was created by Dragging and Dropping a Rule to the Watchlist and selecting % Bars True In Period.

- Drag and Drop that same Rule into RealCode Editor.

Doing so should add a line to your RealCode. What this line looks like is going to depend on the specific Rule that was Dragged and Dropped int othe RealCode Editor, but the basic structure is going to be:

'# MR = condition.MyRule

Where '# lets the RealCode Editor know that this is special instructions for StockFinder that are not part of standard Visual Basic, where MR is the variable name assigned to the Dragged and Dropped Rule and where = condition.MyRule tells the RealCode Editor what Rule is being assigned to the variable.

The variable name is generally constructed from the Name of the Rule... in this case My Rule. You will need to change it to MR if a different name is assigned, or use the name assigned to replace MR throughout the rest of the RealCode.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
pipeacosta
Posted : Friday, August 7, 2009 5:15:11 PM
Registered User
Joined: 4/12/2008
Posts: 41
The column works perfectly, thanks. Can I filter the watch list, so only stocks that have a value of 1 or more , in the column, stay and the rest with 0 value removed? thanks again.
Bruce_L
Posted : Monday, August 10, 2009 11:30:18 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You could right-click on the RealCode Indicator and select Create Rule | Greater Than Value: 0 to create a Rule that could be used as a Filter (by Dragging and Dropping the Rule to the Filter).

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