Profile Picture

MySymbolScript and Lists (VB Net)

Posted By benzeen 3 Years Ago
Message
Posted Wednesday April 16 2014
I am a less a coder and more a trader and am trying to figure out where my error is in incorporating lists (as I wish to Rank potential trade options based on various proprietary indicators). I have looked at the SymbolRanking example provided, but it is unfortunately in C#. I have managed to decipher and convert most to a VB.net version, but am struggling with the orderedSymbolScripts list creation...can anyone help convert that aspect of the C# code for me?

Here's my attempt so far...

Public Class MySystem
   Inherits MySystemBase

   Public Overloads Overrides Sub Startup()
      ' Perform initialization or set system wide options here

   End Sub

   Public Overloads Sub Newbar()
   MyBase.NewBar()

   Dim ss As New MySymbolScript
   Dim orderedSymbolScripts As New List()
   orderedSymbolScripts = SymbolScripts.OrderByDescending(ss >= ss.rankValue2).ToList() '(ss >= ss.rankValue2).ToList()
      
   End Sub
End Class


However this fails at the declaration of the list (Dim statement) - I feel that there is a parameter missing in the List(), but for the life of me I can't figure it out. It also fails at the attempt to populate the list.

Any help would be much appreciated!!

Best
BZ
phg
Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)
Posted Wednesday April 16 2014
Sorry I can't spend some time on this this morning but let me suggest trying one of the online "convert C# to VB" tools. That should be future help as well.

-Pete

See also Yahoo group about applying RE.

Posted Wednesday April 16 2014
Pete
Thanks for the response and the suggestion...worked like a champ. In order to contribute and help anyone else encounterings this, see the VB Net code converted for the area giving me heartburn:

      '   Order the symbol scripts so the ones with a higher RankValue come first
      Dim orderedSymbolScripts As List(Of MySymbolScript) = SymbolScripts.OrderByDescending(Function(ss) ss.RankValue).ToList()


Cheers
Stephen
phg
Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)Supreme Being (46,905 reputation)
Posted Thursday April 17 2014
Yep, that statement certainly does get wound up --- I went crossed-eyed just before the middle.

-Pete

See also Yahoo group about applying RE.



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems