Long/Short Differential Gain

Long/Short Differential Gain

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)

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or
Related users ' posts
Marc Boliart Hi! i do not know why _v.1.1"] was on 1st line, remember to remove it!
Iván
1 week ago
Iván Change line 23 for this IF BarIndex <= 2 THEN
roccafragius Thank you so much!!!!!! :):)
roccafragius Hi Ivan, unfortunatelly I still hace some problem using timeframe 3 minutes in 1 minutes, th...
Iván
2 weeks ago
Violet Ivan, it looks as if something is really wrong with this indicator. When I import and apply ...
Iván Hello! For proper visualization, it is recommended to have more than 1k bars loaded.
Violet Thanks Ivan. Though it does not remove the 'tapering at the beginning' phenomenon, it does m...
2 Fast Two things stand out to me: I see a lot of horizontal blocks in the chart instead of vertica...
lkiklkik thanks for the hard work and sharing
adeelq79 Great work Ivan. Thanks
Quino Another really interesting indicator. It works very well on periods below 25. Just a few cos...
MaoRai54 hello, it seems to be very good, but I'm doing intraday and I'm getting very different forec...
Iván Hi! I use this indicator in daily basis. In intraday timeframes, volume changes a lot depend...
sam00075 Accuracy is on point.
Mubin1308 Bonjour à tous, J'ai importé le fichier mais ça ne marche pas, rien qui s'affiche. Pourriez...
hdb1 Thank you so much Ivan..Been using this on 30min timeframe with excellent results. Now my ma...
Iván
3 months ago
Iván Sorry... There is a mistake in line 76. Should be if openday[i]openday[i+1] then
DLVx You do not specify how to read the Calmar ratio. Above 1 is OK and 0 is neutral? Can you she...
lee HI thank you for this indicator. Is it possible to create a screener based on this for when ...

Top