Creating a stop loss based on an indicator value
Author: Tobey
Creation Date: 12/15/2016 4:27 PM
profile picture

Tobey

#1
Hi Cone & Eugene,

The standard stop loss captures the purchase price and calculate the percentage change of the captured price.

Is it possible to capture an indicator value at the time of purchase so that you could calculate a change in the indicator value as a stop value.

For example let's say you use a rate of change indicator turning up as your buy signal. But instead of continuing up the indicator turns down and goes below the indicator value when you bought. Could you create a stop based on the indicator being 5% below the indicator value on the purchase date?

Many thanks again,
Tobey
profile picture

Eugene

#2
Tobey,

You can capture an indicator's value at the time of purchase and store it with the Position being created using the Position .Tag property (for example). Check out the QuickRef (F11 key) for usage example. But to create a stop based on an indicator you'd have to reverse engineer that indicator to know what percentage of its move is associated with the price move.

http://www2.wealth-lab.com/WL5WIKI/TASCNov2013.ashx
http://www2.wealth-lab.com/WL5WIKI/RevEngMACDSignal.ashx
http://www2.wealth-lab.com/WL5WIKI/RevEngMACD.ashx
http://www2.wealth-lab.com/WL5WIKI/TASCJan2012.ashx
http://www2.wealth-lab.com/WL5WIKI/RevEngRSI.ashx
http://www2.wealth-lab.com/WL5WIKI/RevEngSMA_TC.ashx
profile picture

Tobey

#3
Hi Eugene,

Many Thanks! It worked. Knowing where to start is a real big help!

Tobey
profile picture

Eugene

#4
Hi Tobey,

You're welcome.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).