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 |

RealCode to loop through WatchList Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
maljester
Posted : Tuesday, January 28, 2014 10:53:34 AM
Platinum Customer Platinum Customer

Joined: 1/30/2005
Posts: 135

How do I get RealCode to loop through a WatchList?  I set up test WatchList with three symbols and the following code only displays the message for current hilited symbol.

Static sym As String
If Me.isLastBar And sym <> CurrentSymbol Then
      showmessage(currentsymbol & " " & price.STOC(21, 8))
      sym = CurrentSymbol
End If
Bruce_L
Posted : Tuesday, January 28, 2014 11:07:16 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

There is no way to create RealCode which in and of itself loops through a WatchList.

You would need to use the RealCode indicator or Condition as a WatchList Column or in a Custom Market Indicator to create the loop through the WatchList. The RealCode itself will still only calculate for a single symbol at a time (although the value of a Static variable can survive between symbols if it is not reset).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
maljester
Posted : Tuesday, January 28, 2014 2:39:11 PM
Platinum Customer Platinum Customer

Joined: 1/30/2005
Posts: 135

Made condition a scan.  It looped through WatchList calling code to write data to Access database.  Worked great.  Thanks for you help.

Bruce_L
Posted : Tuesday, January 28, 2014 2:58:53 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.