Return to Snippet

Revision: 43819
at March 31, 2011 08:04 by ram321


Initial Code
If ((ibuy = 0) And (isell = 0)) Then
        
        itradeb = shtTrading.Range("itrade").Value + 1
        
        If ((itrade = 7)) Then
            sum = shtTrading.Range("D2").Cells(1, 1).Value
            sum = sum + shtTrading.Range("D2").Cells(2, 1).Value
            sum = sum + shtTrading.Range("D2").Cells(3, 1).Value
            sum = sum + shtTrading.Range("D2").Cells(4, 1).Value
            sum = sum + shtTrading.Range("D2").Cells(5, 1).Value
            sum = sum + shtTrading.Range("D2").Cells(6, 1).Value
            sum = sum + shtTrading.Range("D2").Cells(7, 1).Value
            
            If (shtTrading.Range("D2").Cells(1, 1).Value < 0#) And _
               (shtTrading.Range("D2").Cells(2, 1).Value < 0#) And _
               (shtTrading.Range("D2").Cells(3, 1).Value < 0#) And _
               (shtTrading.Range("D2").Cells(4, 1).Value < 0#) And _
               (shtTrading.Range("D2").Cells(5, 1).Value < 0#) And _
               (shtTrading.Range("D2").Cells(6, 1).Value < 0#) And _
               (shtTrading.Range("D2").Cells(7, 1).Value < 0#) And _
               (sum > -150#) Then
                     'ibreak = 1
            End If
        End If

Initial URL

                                

Initial Description

                                

Initial Title
automated trading - code vba 6

Initial Tags

                                

Initial Language
Visual Basic