-
October 11th, 2016, 10:03 PM
#1
Can someone kindly explain what these code mean
Please explain what these codes do in plain English .
[code]
If (data.getRecordCount < 20) Then
data.CloseDatabase
Else
Dim average As New MovingAverage
Dim set As New RecordSet
Dim set2 As New RecordSet
[set] = average.ExponentialMovingAverage(data, set3.getField("High"), 2, "A")
set2 = average.ExponentialMovingAverage(data, set3.getField("Low"), 2, "A")
Last edited by Sam.chris; October 31st, 2016 at 11:03 AM.
Reason: shorter code
-
October 13th, 2016, 07:41 AM
#2
Re: Can someone kindly explain what these codes mean
So many Views and no replies
-
October 13th, 2016, 09:47 AM
#3
Re: Can someone kindly explain what these codes mean
Unfortunately I'm not a VB programmer so can't really help - as it would just be a guess.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 14th, 2016, 08:11 PM
#4
Re: Can someone kindly explain what these codes mean
-
October 17th, 2016, 08:19 AM
#5
Re: Can someone kindly explain what these codes mean
First of all it is code not codes, secondly it is VB.Net not VB6 or older.
I have moved the thread to the correct section of the forum.
As for explaining the code, sorry but that would take a good bit of time to fully explain what each line does.
Always use [code][/code] tags when posting code.
-
October 29th, 2016, 03:51 PM
#6
Re: Can someone kindly explain what these codes mean
It is quite difficult to explain precisely as we do not know in which context you are using this code. Obviously you didn't find this code out of the blue, you must have searched for some sort of solution and found this.
It seems as if the code opens a database file and / or a CSV file
-
October 31st, 2016, 10:54 AM
#7
Re: Can someone kindly explain what these codes mean
[set] = average.ExponentialMovingAverage(data, set3.getField("High"), 2, "A")
set2 = average.ExponentialMovingAverage(data, set3.getField("Low"), 2, "A")
Thanks to all who responded, have shortened the code . My understanding is its a EMA of 2 periods, am I right ? and what does "A" mean here.
Last edited by Sam.chris; October 31st, 2016 at 11:17 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|