Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: maljester
About
User Name: maljester
Groups: Gold User, Member, Platinum User, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Sunday, January 30, 2005
Last Visit: Friday, February 23, 2018 3:55:23 PM
Number of Posts: 124
[0.04% of all post / 0.03 posts per day]
Avatar
Last 10 Posts
Topic: StdDev
Posted: Friday, January 19, 2018 3:49:30 PM

thanks for your help.

Topic: StdDev
Posted: Friday, January 19, 2018 3:04:37 PM

Is RealCode possible the the following?

SQR(ABS((SUM(LOG((H + L + C) / 3) - LOG((H1 + L1 + C1) / 3), 30) - SUM(LOG((H + L + C) / 3) - LOG((H1 + L1 + C1) / 3), 30) ^ 2 / 30) / 30))

Topic: VFI (Volume Flow Indicator)
Posted: Thursday, January 11, 2018 4:31:46 PM
"Else If mf < cutoff then" in prior post s/b 
Else If mf < -cutoff Then
but this make vcp zero
 
 
&#39;# Length = UserInput.Integer = 130
&#39;# coef = UserInput.Integer = .2
&#39;# vcoef = UserInput.Integer = 2.5
Dim inter As Single
Dim typical As Single
Dim typical1 As Single
Dim vinter As Single
Dim cutoff As Single
Dim vave As Single
Dim vmax As Single
Dim vc As Single
dim mf as Single
Dim vcp As Single
Dim vfi As Single
Dim vfima As Single
Dim d As Single
Dim signallength As Single = 5
Static SumC As Single
Static SumSq As Single
 
&#39;typical = hlc3
&#39;inter = log(typical) - log(typical[1] )
&#39;vinter = stdev(inter, 30)
&#39;cutoff = coef * vinter * close
&#39;vave = sma(volume, length)[1]
&#39;vmax = vave * vcoef
&#39;vc = iff(volume < vmax, volume, vmax) //min(volume, vmax)
&#39;mf = typical - typical[1]
&#39;vcp = iff(mf > cutoff, vc, iff(mf < -cutoff, -vc, 0))
 
&#39;vfi = ma(sum(vcp, length) / vave, 3)
&#39;vfima = ema(vfi, signalLength)
&#39;d = vfi - vfima
 
typical = (price.High + price.Low + price.Close) / 3
typical1 = (price.high(1) + price.Low(1) + price.Close(1)) / 3
&#39;inter = log(typical) - log(typical[1] )
inter = system.Math.Log(typical) - system.Math.Log(typical1)
&#39;vinter = stdev(inter, 30)
&#39;# Period = UserInput.Integer = 30
 
If isFirstBar Then
SumC = 0
SumSq = 0
Else If CurrentIndex > Period Then
SumC -= inter
SumSq -= inter ^ 2
Else
SumC += inter
SumSq += inter ^ 2
End If
If CurrentIndex >= Period - 1 Then
vinter = system.Math.abs((SumSq - SumC ^ 2 / Period) / Period) ^ .5
Else
vinter = Single.NaN
End If
cutoff = coef * vinter * price.close
vave = volume.AVGC(length, 1)
vmax = vave * vcoef
&#39;vc = iff(volume < vmax, volume, vmax) //min(volume, vmax)
If volume.Close < vmax Then
vc = volume.close
Else
vc = vmax
End If
 
mf = typical - typical1
If mf > cutoff Then
vcp = vc
Else If mf < -cutoff Then
vcp = -vc
Else 
vcp = 0
End If
plot = vcp
Topic: VFI (Volume Flow Indicator)
Posted: Thursday, January 11, 2018 4:20:43 PM

Is it possible to just translate the TC2000 code to RealCode?

XAVG(IIF(AVGV130.1 > 0, SUM(IIF(ABS(H + L + C - H1 - L1 - C1) / 3 > .2 * SQR(ABS((SUM(LOG((H + L + C) / 3) - LOG((H1 + L1 + C1) / 3), 30) - SUM(LOG((H + L + C) / 3) - LOG((H1 + L1 + C1) / 3), 30) ^ 2 / 30) / 30)) * C, SGN(H + L + C - H1 - L1 - C1) * LEAST(V, AVGV130.1 * 2.5), 0) , 130) / AVGV130.1, 0), 3)
 

 

Topic: VFI (Volume Flow Indicator)
Posted: Thursday, January 11, 2018 4:12:41 PM

code after StdDev logic change

&#39;# Length = UserInput.Integer = 130
&#39;# coef = UserInput.Integer = .2
&#39;# vcoef = UserInput.Integer = 2.5
Dim inter As Single
Dim typical As Single
Dim typical1 As Single
Dim vinter As Single
Dim cutoff As Single
Dim vave As Single
Dim vmax As Single
Dim vc As Single
dim mf as Single
Dim vcp As Single
Dim vfi As Single
Dim vfima As Single
Dim d As Single
Dim signallength As Single = 5
Static SumC As Single
Static SumSq As Single
 
&#39;typical = hlc3
&#39;inter = log(typical) - log(typical[1] )
&#39;vinter = stdev(inter, 30)
&#39;cutoff = coef * vinter * close
&#39;vave = sma(volume, length)[1]
&#39;vmax = vave * vcoef
&#39;vc = iff(volume < vmax, volume, vmax) //min(volume, vmax)
&#39;mf = typical - typical[1]
&#39;vcp = iff(mf > cutoff, vc, iff(mf < -cutoff, -vc, 0))
 
&#39;vfi = ma(sum(vcp, length) / vave, 3)
&#39;vfima = ema(vfi, signalLength)
&#39;d = vfi - vfima
 
typical = (price.High + price.Low + price.Close) / 3
typical1 = (price.high(1) + price.Low(1) + price.Close(1)) / 3
&#39;inter = log(typical) - log(typical[1] )
inter = system.Math.Log(typical) - system.Math.Log(typical1)
&#39;vinter = stdev(inter, 30)
&#39;# Period = UserInput.Integer = 30
 
If isFirstBar Then
     SumC = 0
     SumSq = 0
Else If CurrentIndex > Period Then
     SumC -= inter
     SumSq -= inter ^ 2
Else
     SumC += inter
     SumSq += inter ^ 2
End If
If CurrentIndex >= Period - 1 Then
     vinter = system.Math.abs((SumSq - SumC ^ 2 / Period) / Period) ^ .5
Else
     vinter = Single.NaN
End If
cutoff = coef * vinter * price.close
vave = volume.AVGC(length, 1)
vmax = vave * vcoef
&#39;vc = iff(volume < vmax, volume, vmax) //min(volume, vmax)
If volume.Close < vmax Then
     vc = volume.close
Else
     vc = vmax
End If
 
mf = typical - typical1
If mf > cutoff Then
     vcp = vc
Else If mf < cutoff Then
     vcp = -vc
Else 
     vcp = 0
End If
plot = vcp
Topic: VFI (Volume Flow Indicator)
Posted: Thursday, January 11, 2018 4:03:20 PM

I don&#39;t think my StdDev code is correct

Topic: VFI (Volume Flow Indicator)
Posted: Wednesday, January 10, 2018 7:58:35 PM

Changed StdDev code to the following and am getting a value but vcp is zero

If isFirstBar Then
     SumC = 0
     SumSq = 0
Else If CurrentIndex > Period Then
     SumC -= inter
     SumSq -= inter ^ 2
Else
     SumC += inter
     SumSq += inter ^ 2
End If
If CurrentIndex >= Period - 1 Then
     vinter = system.Math.abs((SumSq - SumC ^ 2 / Period) / Period) ^ .5
Else
     vinter = Single.NaN
End If
Topic: VFI (Volume Flow Indicator)
Posted: Wednesday, January 10, 2018 2:36:59 PM

Trying to create Volume Flow Indicator with RealCode.  

Plot vcp then drag it to indicator to calculate vfi.

Then drag vfi to indicator to calculate vfima.

Then plot vfi - vfima

I have a problem at StdDev step.  SumC & SumSq are zero.

Can you help me? or is there a better way?  Trying to get RealCode version that gives similar zero crosses to your TC2000 code.

 
&#39;# Length = UserInput.Integer = 130
&#39;# coef = UserInput.Integer = .2
&#39;# vcoef = UserInput.Integer = 2.5
Dim inter As Single
Dim typical As Single
Dim typical1 As Single
Dim vinter As Single
Dim cutoff As Single
Dim vave As Single
Dim vmax As Single
Dim vc As Single
dim mf as Single
Dim vcp As Single
Dim vfi As Single
Dim vfima As Single
Dim d As Single
Dim signallength As Single = 5
Static SumC As Single
Static SumSq As Single
If isFirstBar Then
     SumC = 0
     SumSq = 0
End If
&#39;typical = hlc3
&#39;inter = log(typical) - log(typical[1] )
&#39;vinter = stdev(inter, 30)
&#39;cutoff = coef * vinter * close
&#39;vave = sma(volume, length)[1]
&#39;vmax = vave * vcoef
&#39;vc = iff(volume < vmax, volume, vmax) //min(volume, vmax)
&#39;mf = typical - typical[1]
&#39;vcp = iff(mf > cutoff, vc, iff(mf < -cutoff, -vc, 0))
 
&#39;vfi = ma(sum(vcp, length) / vave, 3)
&#39;vfima = ema(vfi, signalLength)
&#39;d = vfi - vfima
 
typical = (price.High + price.Low + price.Close) / 3
typical1 = (price.high(1) + price.Low(1) + price.Close(1)) / 3
inter = system.Math.Log(typical) - system.Math.Log(typical1)
&#39;vinter = stdev(inter, 30)
&#39;# Period = UserInput.Integer = 30
 
SumC += inter
SumSq += inter ^ 2
If CurrentIndex >= Period Then
     SumC -=  inter
     SumSq -= inter ^ 2
End If
If CurrentIndex >= Period - 1 Then
     vinter = system.Math.abs((SumSq - SumC ^ 2 / Period) / Period) ^ .5
Else
     vinter = Single.NaN
End If
 
vave = volume.AVGC(length, 1)
 
vmax = vave * vcoef
&#39;vc = iff(volume < vmax, volume, vmax) //min(volume, vmax)
If volume.Close < vmax Then
     vc = volume.close
Else
     vc = vmax
End If
 
cutoff = coef * vinter * price.close
vave = volume.AVGC(length, 1)
vmax = vave * vcoef
If volume.close < vmax Then
     vc = volume.close
Else 
     vc = vmax
End If
mf = typical - typical1
If mf > cutoff Then
     vcp = vc
Else If mf < -cutoff Then
     vcp = -vc
Else 
     vcp = 0
End If
plot = vcp 
&#39;vfi = ma(sum(vcp, length) / vave, 3)
&#39;vfima = ema(vfi, signalLength)
&#39;d = vfi - vfima

 

Topic: V18 TO V17
Posted: Tuesday, December 12, 2017 12:02:25 PM

For those of us unable to attend the Orlando training, it might be nice to have a video of how some of the new features work.  This might sovle the worries about how V18 works.

Topic: V18 TO V17
Posted: Monday, December 11, 2017 12:09:12 PM

deleting startsettings.dat file fixes the issue.  I can now get to V17.