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


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Clear Method Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mj67371
Posted : Wednesday, September 29, 2010 3:35:31 PM
Registered User
Joined: 12/7/2004
Posts: 2
Does anyone have a solution for adding in code to identify "Noise" in the Clear Method as described in the October issue of S&C?

The code for the adding a "noise" filter was not provided in the Trader's Tips section.
Bruce_L
Posted : Wednesday, September 29, 2010 4:16:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You could add Noise to the Paint Scheme as follows:

Static Swing As Integer
Static HighestLow As Single
Static LowestHigh As Single
Dim Noise As Boolean = False
If isFirstBar Then
    Swing = 0
    HighestLow = Line.Low
    LowestHigh = Line.High
End If
If Line.Low > HighestLow Then
    HighestLow = Line.Low
Else If Swing = 1 Then
    Noise = True
End If
If Line.High < LowestHigh Then
    LowestHigh = Line.High
Else If Swing = -1 Then
    Noise = True
End If
If Line.Low > LowestHigh Then
    Swing = 1
    HighestLow = Line.Low
    LowestHigh = Line.High
    Noise = False
Else If Line.High < HighestLow Then
    Swing = -1
    HighestLow = Line.Low
    LowestHigh = Line.High
    Noise = False
End If
If Swing = 1 Then
    PlotColor = Color.Lime
Else If Swing = -1 Then
    PlotColor = Color.Red
Else
    PlotColor = Color.Yellow
End If
If Noise = True Then
    PlotColor = Color.White
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mj67371
Posted : Wednesday, September 29, 2010 4:24:05 PM
Registered User
Joined: 12/7/2004
Posts: 2
Perfect! Thanks!
jschott
Posted : Wednesday, September 29, 2010 6:34:55 PM
Registered User
Joined: 10/27/2004
Posts: 821
Location: Philly area

Super Job, but I have a question about overlaying various Paint / Label statements is possible without interaction.

Suppose I wanted to label add to the Real Code you wrote to add a label to:

1.) the first Green after the last previous Red Bar
          (ignoring the interviening white and yellow Bars)

2/) the first Red after the last previous Green Bar
          (again ignoring the white and yellow Bar).

In each case, the label code should not change the Bar colors and need only be something like:

  -  an arrow of the corresponding color and direction located above or below appropriate first GREEN or RED or bar (againing ignoring all white and yellow bars plus all bars where the RED or GREEN color is not changed)

Could you give an example of how this can be accomplished by a modification to your Real Code, or how it would be done by a second Real Code module if not practical.

Also,
If both methods are possible, is there a likely speed penality of using two Read Code modules instead of just one integrated one?

Thanks Again for yet another super tutorial in real code for us code dummys.

 

jschott
Posted : Wednesday, September 29, 2010 6:40:19 PM
Registered User
Joined: 10/27/2004
Posts: 821
Location: Philly area
OOPS, cancel my request on the previous line - I see you already did for other customers - including a PCF topic too.

I should have looked further when I saw the posting.

Again.  Thanks from all of us!
Bruce_L
Posted : Thursday, September 30, 2010 9:12:49 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jschott,
You're welcome. I'm happy to read you were able to find the posts answering your questions.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.