@admin plz to be having a method to cast an element of a series to an integer
This sucks: for each new candle that appears you must use the settings gear to set "last_candle_on_chart" to match the highest 'n' on the bottom graph. When buying, set "buy_in_candle" to the "n" of the candle you bought at.
This shows how to use Pine script to see only a horizontal line on your chart. This example shows the line at 3% below the last candle's close price.