VS
SR is right. I am also getting this tick everyday and not able to find a solution yet. This is happening due to following reasons.
1. NOW/NEST do not give Date in Market Watch. We are using System date.
2. If you open NOW in the morning it shows previous day's last quote in the Market Watch.
3. Our utility gets the quote as current days's tick.
4. The trade time of the quote is between 9:15 and 15:30. Mostly, it is 15:29:58 Therefore it cannot be filtered out.
I am trying to deal with this situation. If you are able to change code, insert the Bold lines in MakeCSV subroutine. Entire Paragraph is given for you to know the place where they are to be inserted. We are basically skipping the quote if its timestamp is of future.
If NSENOW = "Yes" Then
MyBook.Sheets("Now").Select 'Selects sheet containing quotations
For r = 7 To Range("A65536").End(xlUp).Row
S = Format(Date, "dd/mm/yyyy") & ","
C = 1
If TimeValue(Cells(r, 2)) > TimeValue(NOW()) Then GoTo nextiteration
While Not IsEmpty(Cells(r, C))
If C = 4 Then
CellValue = Cells(r, C).Value - Vol(r, 1)
Vol(r, 1) = Cells(r, C).Value
' Debug.Print Cells(r, 1).Value & " - " & CellValue & " - " & Vol(r, 1)
Else
CellValue = Cells(r, C).Value '
End If
' CellValue = Cells(r, C).Value '
S = S & CellValue & "," 'Add contents of current cell to string 's' and a comma
C = C + 1
Wend
a.writeline S 'write line
nextiteration:
Next r
End If