Nicolas

Scalping line indicator

Category: Indicators By: Nicolas Created: October 21, 2015, 9:21 PM
October 21, 2015, 9:21 PM
Indicators
3 Comments
Scalping line indicator

Here is another derivated indicator of the stair step moving average exploration. This time the stairstep MA (the main trend) represent the center of the oscillator. The signal line (white line on screenshot attached) is the difference between this center and a simple moving average of 7 periods by default. 

Trade signals seems pretty effective on tick charts representation (DAX/GER30 100 or 20 ticks for example). Take long when signal line cross above zero and short below it. Of course, as always objectives and stoploss protection are your responsabilities 🙂

You can play with different parameters to sweet any other instruments.

//parameters :
//percent = 1 
//mainperiod = 100
//signalperiod = 7

once ssMA = close
MA = TriangularAverage[mainperiod](close)

if(MA > ssMA + (MA/100)*percent) THEN
   ssMA = MA
ELSIF (MA < ssMA - (MA/100)*percent) THEN
   ssMA = MA
ELSE
   ssMA = ssMA
ENDIF

signalLine = average[signalperiod](close)

linedraw = signalLine - ssMA


RETURN linedraw as "scalp line", 0 as "center line"

 

Download
Filename: scalping-line-20-ticks.png
Downloads: 193
Download
Filename: Scalping-line.itf
Downloads: 521
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

cruxtrader
4 years ago
#

Hello Nicolas, Is this script Ninjatrader Compatible ?

XBKZ
10 years ago
#

Bonjour,

Je trouve votre indicateur très intéressant. J'ai essayé de créer un autre indicateur qui appelle celui-ci pour lisser la courbe "scalping line" mais il ne se passe rien. Y a t'il un moyen de faire un fichier log ou de créer un message pour visualiser les variables ? Je vous poste mon code si vous avez un moment. Je vous en remercie par avance.

// Scalping Line Lissée
// Utilise Scalping Line et en fait la moyenne mobile

//parameters of Scalping Line Indicator
//percent = 1
//mainperiod = 100
//signalperiod = 7

//MMPeriod = 2

numerateur = 0
For i = MMPeriod to 0
linedraw, ignored = CALL "Scalping line"[percent, mainperiod, signalperiod]
numerateur = numerateur + linedraw
NEXT

moyenne = numerateur / (MMPeriod + 1)

RETURN moyenne as "scalp line lisse", 0 as "center line"

 

Nicolas
10 years ago
#

Pour visualiser une variable, il suffit de l'ajouter dans la fonction RETURN et la plateforme l'affichera tout simplement :)

Pour lisser une information issue d'une variable, tu peux utiliser un indicateur de moyenne mobile existant dans la plateforme comme ceci :

lissage = average[20](linedraw)

Où 20 est la période de lissage.

ProRealCode ProRealCode
Loading...