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

ADX Sell Signal Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
aksmith
Posted : Wednesday, February 3, 2010 10:17:57 PM
Registered User
Joined: 3/13/2005
Posts: 4
I like to use an 18 period ADX from a trend following perspective.  I would like to create a  Rule that I can use in Back Scanner that would indicate a sell signal when the following conditions exist:
1.  ADX has crossed above the +DI and is currently above the +DI line.  (the cross point is not important, the fact that a cross has occured and that the 18 period ADX is above the +DI line, regardless of value, is important)
2. After having been abovet the +DI line, the 18 period ADX stops its upward progression and turns downward.
I suspect that this needs to be written in Real Code but
I have limited experiance with that.

Note:  I have been using TeleChart for abt 10 yeras.  StockFinder Rocks! 
Bruce_L
Posted : Thursday, February 4, 2010 10:18:10 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
If you already have a Directional Movement DI ADX Indicator on the Chart, you should be able to Drag and Drop the +DI and ADX Indicators into the Code tab of the RealCode Editor to create something similar to the first two lines of the following RealCode Rule:

'# DMDA = indicator.DirectionalMovementDIADX
'# AL = indicator.ADXLine.2
'# Cumulative
Static Up As Boolean
If isFirstBar Then
    Up = False
Else
    If AL.Value > AL.Value(1) Then
        Up = True
    Else If AL.Value < AL.Value(1) Then
        If AL.Value(1) > DMDA.Value(1) AndAlso _
            Up = True Then
            Pass
        End If
        Up = False
    End If
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
rnunez
Posted : Wednesday, May 5, 2010 10:39:28 AM
Registered User
Joined: 4/5/2010
Posts: 11
Hi Bruce
I try to copy this in my RealCode for practice but I fund an error>

Name 'Pass' is not declared

what can I do?
Bruce_L
Posted : Wednesday, May 5, 2010 10:57:24 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
rnumez,
It reads like you are trying to use the RealCode as a RealCode Indicator or RealCode Paint Brush. The RealCode is intended for use as a RealCode Rule or RealCode Condition. The Pass syntax is only valid as part of a RealCode Rule or RealCode Condition.

-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.