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
NEOMKEY Magnífico !!!. Al menos para mí. Gran trabajo con tus aportes Iván. Mira a ver si le incluye...
Iván jajaja gracias :)
Iván No, semplicemente diverso
roccafragius Felicitaciones Ivan, este indicador me parece muy útil y mucho más rápido que las zonas de o...
roccafragius Congratulations Ivan, this indicator seems to me to be very useful and much quicker than the...
Stenozar Ciao Ivan, ho provato ma non mi lascia caricare il post, non so per quale strano motivo...
Iván Allora crei un nuovo post. Lo aspetterò.
Stenozar Ciao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
kats Bonsoir, Pensez vous pouvoir répondre à ma question posée ci dessus? Ce serait vraiment tr...
Iván Bonjour L'ensemble de l'indicateur est alimenté à partir de la ligne 9 avec la définition d...
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
kats j ai fait une copie d'ecran mais je ne sais pas comment l'envoyer sur le site
luiskohnen This indicator re-paint?
Iván Hi, Sorry, but what do you mean?
Iván Thanks ;)
kats BONJOUR je lai mis sur du renko , il est complexe car toujours a l'envers??? Peut être ne ...
RTR Great tool again and great job, thank you! So from what I see everytime Z-Score is over 0 m...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
14starwberryhill Such a wonderful work, thanks Ivan..............
larouedegann TIMEFRAME(15minutes) apparemment ne fonctionne pas
Iván Bonjour Je ne comprends pas bien le problème. L'indicateur fonctionne dans n'importe quelle...
larouedegann OUI je le sais, il fonctionne dans toutes les unités de temps. Mais je souhaite utiliser l'i...
Iván
1 month ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
Iván
1 month ago
Danger Zones Indicator
Danger Zones Indicator
4
Indicators
Iván Thank you very much!
Claudio Good morning Ivan. I try to use this indicator but I receive the automatic message on line 7...
Iván Hi Claudio The indicator works fine. Maybe you are with PRT11 instead PRT12?
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Iván sería así //------------------Inputs------------------------------ linreglength = 11//i...
Doddge Muchísimas gracias Iván, está genial.
superfalcio holaaa, have you run some statistics?
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
el titi Bonjour, merci beaucoup pour ce partage. Je vais regarder avec attention ce script et analys...
Armand2020 Bonjour , super taf!! serait il possible de faire un poc dynamique en timeframe 5 min en mod...
philippe59139 voici ce qu'il faudrait faire ou ajouter: //poc dynamique defparam calculateonlastbars=1...
Iván
2 months ago
Iván I personally like it in daily timeframe
oliTR Many thanks Ivan, I copy/paste your code to try it but could only get a constant stable unif...
Iván Hi, I've copied the code above and it works... what asset are you trying? $indices array ...

Top