Alt hedge v0.9: big update

The new lines added to the plot showing the floating PNL of both the long and the short concurrent positions. Notice how the short position was at unrealised loss before crossing down the gray line to enter profit at the same time with the long.

Bug fixes and new features:

  • All versions before 0.9 were calculating profits from the % move of the spread (close A / close B). In this new version profits are calculated from total floating PNL of A + B / 2 This gives the real PNL compared to the spread method. You will noticed reduce and more realistic results.
  • Plots with the profit of each pair floating PNL. Now you can visualise how each of the coins performance is progressing individually. Each plot will show in gray unless its in profit. Once the line turns green it will mean the long is in profit. IF it turns in red will mean the short enters the profit area.
  • Data window additional data. In the data window you will find the following new items: longEntryClose (the entry close price of the long), closeLong (current close of the long), longFloatingP (percentage floating PNL of long), and the same values for the corresponding short.

Alt hedge is a VIP members pine script that simplifies running hedge pair trading with a selection of coins simultaneously.

Featured products and TTP memberships