VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A stock market indicator and predictor proven to be 87% accurate in predicting market indeces six t

by Andrew Flynn (1 Submission)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 7th November 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A stock market indicator and predictor proven to be 87% accurate in predicting market indeces six to eight month out.

Rate A stock market indicator and predictor proven to be 87% accurate in predicting market indeces six t



'in computers and programing.


Dim i As Single
 

 Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)



Private Sub Form_Click()

Cls

Form1.DrawWidth = 1
Form1.DrawStyle = 0
Form1.ForeColor = vbBlack

Line (0, ScaleHeight / 2)-(ScaleWidth, ScaleHeight / 2)   'Zero starting point

Form1.DrawStyle = 2      'dotted line

For i = 0 To ScaleWidth Step 2000

Line (i, ScaleHeight / 2 - 150)-(i, ScaleHeight / 2 + 150)

Form1.FontSize = 12
Form1.Font.Bold = True
Print i / 2000; " Months"
Next i
 
For i = 0 To ScaleHeight Step ScaleHeight / 10
 Line (0, i)-(300, i)
 Line (ScaleWidth, i)-(ScaleWidth - 300, i)
 
Next i

End Sub

Private Sub Form_DblClick()
  



DrawWidth = 3

i = ScaleHeight / 2

Randomize

 z = (Rnd * 150) + 50      ' Volatilaty  need formula for numbers between 50 and 150

For q = 1 To ScaleWidth

z = (Rnd * 150) - 50      'Seems to be the same whether in or out of  For-Loop

 i = i + Sin(i) * z
 
 
 PSet (q, i)
 
 'Sleep 0.5
 
 'For z = 1 To 30000      'slows down calculation
  'Next z
 
DoEvents

Next q

Beep

If i < Form1.ScaleHeight / 2 - 2000 Then
'Beep
CurrentX = 2000
CurrentY = 7000
 
ElseIf i > Form1.ScaleHeight / 2 - 2000 And i < Form1.ScaleHeight + 2000 Then
'Beep
CurrentX = 2000
CurrentY = 2000
 
ElseIf i > Form1.ScaleHeight + 2000 Then
'Beep
CurrentX = 2000
CurrentY = 2000
 
End If

Sleep 2000

Form1.FontSize = 14
Form1.ForeColor = vbBlue

If i < Form1.ScaleHeight / 2 - 2000 Then
 q = (Abs(i - Form1.ScaleHeight / 2) / (Form1.ScaleHeight / 2)) * 100
Print q / 2 & " %  Increase.  This might well be a good time to Invest."

ElseIf i > Form1.ScaleHeight / 2 - 2000 And i < Form1.ScaleHeight / 2 + 2000 Then
Print "Market appears to maintain itself in a trading range."

ElseIf i > Form1.ScaleHeight / 2 + 2000 Then
q = (Abs(i - Form1.ScaleHeight / 2) / (Form1.ScaleHeight / 2)) * 100
Print q / 2 & " %  Decrease.   Probably a poor time to invest."
End If
  
 
End Sub

 



Download this snippet    Add to My Saved Code

A stock market indicator and predictor proven to be 87% accurate in predicting market indeces six t Comments

No comments have been posted about A stock market indicator and predictor proven to be 87% accurate in predicting market indeces six t. Why not be the first to post a comment about A stock market indicator and predictor proven to be 87% accurate in predicting market indeces six t.

Post your comment

Subject:
Message:
0/1000 characters