Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
rarpecalibrate
Contributor III
Contributor III

Potential Profit/Loss between Open Date and Current Date

Hi,

Here is my problem:

I have a straight table with all open currency trades. I have the Type, Currency Pair, Open Date, Current Close Price and Profit/Loss. What I would like to do is see the max High for a period and min Low  for a period - between Open Date and Current Date eg. Today() per trade?

I have the following example:

I have trades that opened on the 6 March and 24 March. I need to find the highest price between the 6 March and Current Day Price and the 24 March and Current Day Price. There may be different Highs because the period between the 6 and 24 might have had a higher  price then the period between the 24 March and current date. Therefore 6 March - Current will have a higher potential profit and the 24 March - Current will have a lower potenital profit.

This is what I have tried so far:

 

max(total {<Date= {">=$(=concat([Open Date],'","'))<=$(=max([Date]))"}>}High)

The problem is that its taking the high from the period between the 6 March and current, and allocating it to both trades.

Please can someone help me. I hope this makes sense.

Ryan

0 Replies