Re: Free RealTime Data NOW Nest ODIN Trade Tiger Google Yahoo to AmiBroker, Fcharts M
You need a counter to do that. Try this. Put this in declarations
Public LastSave as date
find line - RP = Range("B3") in Start Timer subroutine.
Add this below that.
LastSave = Now()
Find line - Call AB.RefreshAll in subroutine Call AmiBroker. Add these lines after that.
If Now() - LastSave > Timevalue("00:05:00")
AB.SaveDatabase
LastSave= Now()
End If
This is not tested. If you get errors google to find out time comparisons in VBA
Dear Josh1.
I was trying to save my amibroker database every five minutes by adding the line in sub Timer()
Application.OnTime Now + TimeValue("00:05:00"), AB.SaveDatabase
but instead of five minutes it save every 3 seconds or whenever the imports are made from csv to amibroker.
Could you please help.
I was trying to save my amibroker database every five minutes by adding the line in sub Timer()
Application.OnTime Now + TimeValue("00:05:00"), AB.SaveDatabase
but instead of five minutes it save every 3 seconds or whenever the imports are made from csv to amibroker.
Could you please help.
Public LastSave as date
find line - RP = Range("B3") in Start Timer subroutine.
Add this below that.
LastSave = Now()
Find line - Call AB.RefreshAll in subroutine Call AmiBroker. Add these lines after that.
If Now() - LastSave > Timevalue("00:05:00")
AB.SaveDatabase
LastSave= Now()
End If
This is not tested. If you get errors google to find out time comparisons in VBA
Last edited: