New version 18 available now


Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

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

Profile: danielbender
About
User Name: danielbender
Groups: Gold User, Member, Platinum User, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Saturday, January 14, 2006
Last Visit: Thursday, May 24, 2018 7:22:00 PM
Number of Posts: 427
[0.15% of all post / 0.09 posts per day]
Avatar
Last 10 Posts
Topic: Minimize Sorting Time for an Indicator
Posted: Wednesday, May 23, 2018 5:23:34 PM

Bruce,  If I did not have SMI indicator in the indicator, could I limit the amount of data backtested? 

Topic: Minimize Sorting Time for an Indicator
Posted: Wednesday, May 23, 2018 12:30:43 PM

Bruce

How do I optimize the following indicator to only look at the last 500 bars, to minimize the time needed to sort?

Thank  you... Dan

++++++++++

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.1 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:UpBar Count
'|*** Example: plot = price.close - price.close(1)
'|******************************************************************
'# SMI = indicator.unlinked.StochasticMomentumIndex
'# Component = UserInput.Integer = 1
 
 
Static Count As Single
Static Marker As Single
Static Lo As Single
Static Entry As Single
Static Pop As Single
 
If isfirstBar Then
Count = Single.NaN
Marker = 0
Pop = 0
Else If (Marker = 0 AndAlso _
(SMI.value > SMI.Value(1) AndAlso SMI.Value(1) < 0 OrElse _
Price.Close - Price.Open > 3 * (Price.Close(1) - Price.Open(1))))Then
Marker = 1
Count = 1
Lo = Price.Low
Else If (Marker = 1 AndAlso _
(Price.High > Price.High(1) AndAlso Price.Low > Price.Low(1) OrElse _ 
Price.Open > Price.Open(1) AndAlso Price.Close > Price.Close(1) OrElse _
Price.Close >= 1.0 * Price.XAVGC(8))) Then
Count += 1
If Count = 3 Then 
Pop = Price.Close - Lo
Entry = Price.Close
End If
Else
Count = 0
Marker = 0
Pop = 0
End If
&#39;If Count >= 2 Then
&#39; Plot = Count
&#39;Else
&#39; Plot = 0
&#39;End If
 
If Component = 1 Then
Plot = Count
Else If Component = 2 Then
If Count > 3
Plot = Price.Close - Entry
Else 
Plot = 0
End If
End If
Topic: Problem Compiling Indicator
Posted: Thursday, May 10, 2018 1:54:57 PM

thx

Topic: Problem Compiling Indicator
Posted: Thursday, May 10, 2018 12:13:02 PM

Bruce

Thanks.  

 
How do I set the 3 parameters for SMI within the indictor?
 
Thanks
Topic: Problem Compiling Indicator
Posted: Wednesday, May 09, 2018 6:05:12 PM

When I run the indicator above, it gives never gives me count = 1.  Can you tell me why?  I know the SMI.Value  changes from below -50 to above -50 for QQQ on April 26.  Thanks

Topic: Problem Compiling Indicator
Posted: Wednesday, May 09, 2018 5:53:40 PM
Bruce
 
How do I set the 3 parameters for SMI?  And how do I reference the Trigger value for SMI?
 
Thanks
 
 
|******************************************************************
&#39;|*** StockFinder RealCode Indicator - Version 5.1 www.worden.com 
&#39;|*** Copy and paste this header and code into StockFinder *********
&#39;|*** Indicator:UpBar Count
&#39;|*** Example: plot = price.close - price.close(1)
&#39;|******************************************************************
&#39;# SMI = indicator.unlinked.StochasticMomentumIndex
 
 
Static Count As Single
Static Marker As Single
 
If isfirstBar Then
Count = Single.NaN
Marker = 0
Count = 1
 
Else If SMI.value > SMI.Value(1) AndAlso SMI.Value(1) < -50 Then
Marker = 1 AndAlso Count = 1
 
Else
Count = 0
Marker = 0
End If
Plot = Count
 
Topic: Problem Compiling Indicator
Posted: Wednesday, May 09, 2018 4:33:19 PM
This is what I am trying to do.
 
Else If (Marker = 1 AndAlso (_
Price.High > Price.High(1) AndAlso Price.Low > Price.Low(1) OrElse _ 
Price.Open > Price.Open(1) AndAlso Price.Close > Price.Close(1) OrElse _
Price.Close >= 1.0 * Price.XAVGC(8)
Then
Count += 1
Topic: Problem Compiling Indicator
Posted: Wednesday, May 09, 2018 4:27:43 PM

Sorry - I want

 

Else if Marker = 1 ANDALSO ( (Orelse ....  Orelse....Orelse) .... Than

 

Is that possible?

Topic: Problem Compiling Indicator
Posted: Wednesday, May 09, 2018 4:26:00 PM

I want 

Else if Marker = 1 (Or else ..... Or else... Orelse.... ).  

Is that possible? thks.

Topic: Problem Compiling Indicator
Posted: Wednesday, May 09, 2018 3:15:45 PM

Sorry - here is all the code

 

Static Count As Single
Static Marker As Single
 
If isfirstBar Then
Count = Single.NaN
Marker = 0
Else If Price.Open > Price.High(1) OrElse _ 
Price.Open < Price.Low(1) Then
Count = 0
Else If SMI.value < -50 AndAlso SMI.Value(1) > -50 Then
Marker = 1 AndAlso Count = 1
Else If Marker = 1 AndAlso _
(OrElse(Price.High > Price.High(1) AndAlso Price.Low > Price.Low(1) OrElse _ 
(Price.Open > Price.Open(1) AndAlso Price.Close > Price.Close(1) OrElse _
Price.Close >= 1.0 * Price.XAVGC(8)) Then
&#39;Else If Price.Open >= 0.9 * Price.Close(1) AndAlso _
&#39; Price.Close > Price.Open AndAlso (Price.High - Price.Low) > 0.9 * (Price.High(1) - Price.Low(1)) _
&#39; AndAlso Count = 0 Then
Count += 1
&#39;Else If Price.Open >= 0.9 * Price.Close(1) AndAlso _
&#39;Price.Close > Price.Open AndAlso Count > 0 Then
Else
Count = 0
Marker = 0
End If
Plot = Count