Long/Short Differential Gain

Category: Indicators By: lolo Created: October 12, 2015, 8:28 PM
October 12, 2015, 8:28 PM
Indicators
0 Comments

The value of this indicator is the difference (in %) between the maximum gain you could have obtained by entering a long position n days (periods) ago and entering a short position at the same time. Only opening prices are taken into acount, to model the behaviour of an ‘amateur’ trader who does not have access to a trading station during the day.

The computation is quite simple. First, imagine you entered a long position n days ago, buying one unit at opening price. Then, imagine you know in advance the highest opening price that will be reached between your entry date and the last day and that you sell at that time. You have a first figure that tells you how much you would have gained (in%). After that first gain, imagine you entered a short position n days ago by selling one unit at opening price. Then you know in advance when to buy back your position at the lowest possible opening price. You have a second figure that tells you how much you would have gained (in%). The final computation is to make the difference between both figures.

Parameters

Number of periods (n = 50)

 o = OPEN[n]

l = HIGHEST[n](OPEN)
s = LOWEST[n](OPEN)

RETURN 100 * (l + s - 2 * o) / o AS"Long/Short Differential Gain"

Download
Filename: Long_Short-Differential-Gain.itf
Downloads: 32
lolo New
Developer by day, aspiring writer by night. Still compiling my bio... Error 404: presentation not found.
Author’s Profile

Comments

Logo Logo
Loading...