Possible to auto save RTD every 5 min in Ami during market hours?

#11
Hi Happy

As you rightly mentioned the above code gives this error:
Ln:35, Col:19 : Warning 503. Using LOE/CreateObject/CreateStatic Object is
not multi-threading friendly. See users Guide "Efficient use of
multithreading" for more detail.

Anyway thanks for trying.

Steve
man its not an error it just an warning, we can still run it none the less :D

anyway, try it if nothing else works out

:) Happy
 

mastermind007

Well-Known Member
#12
Hi All,

Is it possibley to auto save RT data every 5 or 10 minutes in Ami
during market hours, at times during power outages, when pc
goes on the blink, entire data of previous hours is lost, if it was
not saved manually

Is there a way to auto save?

Thanks.

Steve
Yes, Broker COM has a SaveDatabase function that can do this but it has one very annoying side-effect. Every time it saves, Ami will show a progress bar at center of the screen which gets distracting and there is no parameters/flags to turn it off and save silently.
 

josh1

Well-Known Member
#14
Hi Josh1

Thanks for the above changes, getting error
compile error:
Expected End Sub

Not an excel expert so don't know how to work with this error,
its the Private Sub Timer () heading that is yellowed (Shown on top)
and SP = #12:00:00 AM# This code has changed on its own.

Thanks

Steve
Ooops. Missed that.
Just add one line -
End Sub

You can see all other subroutines end with that line.
 
Last edited:
#16
Hi Happy,

Just to let you know the afl, auto save data every 5 min,
you provided is working,

Thanks for the same :thumb:

Steve
You can change the time by keeping it on any chart with required TF, its saving near end of every candle . . . :)

But if you can implement the solution by Josh it is much better, excel handles objects much better. . . (remember the warning we got from Amibroker :lol:)

Also if you are using Josh's utility for data then the database saving routine can be run using the same sheet . . .


:) Happy
 

4candles

Well-Known Member
#17
Steve

Your problem has led to coding of new AFL and Excel tool to help save Ami data automatically, Thanks to Happy And Josh1. :thumb:

But a thought...why are you not using a UPS?(if I may)
If system switches off instantly, every time there is power faliure, there is every chance of creation of bad sectors on your Hard Drive that could damage the HDD and may lead to data loss.



:)
 

Steve

Active Member
#18
You can change the time by keeping it on any chart with required TF, its saving near end of every candle . . . :)

But if you can implement the solution by Josh it is much better, excel handles objects much better. . . (remember the warning we got from Amibroker :lol:)

Also if you are using Josh's utility for data then the database saving routine can be run using the same sheet . . .


:) Happy
Hi Happy,

Josh1 solution is not working even after corrections suggested by josh1,
so I'm ok with your afl, don't want to tinker further, if a particular solution works.

Regarding 4Candles suggestion, an online UPS would be ideal, that will come later.

Steve
 
Last edited:
#19
Hi Happy,

Josh1 solution is not working even after corrections suggested by josh1,
so I'm ok with your afl, don't want to tinker further, if a particular solution works.

Regarding 4Candles suggestion, an online UPS would be ideal, that will come later.

Steve
Yes UPS is a must, once in a while the DB can get corrupted from sudden shutdown . . . meanwhile take backups for the Amibroker data base regularly . .

:) Happy.
 

Similar threads