Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

P&L chart: Size meaning #898

Answered by kernc
jjviton asked this question in Q&A
Discussion options

Hi all,
I ́m quite new using this tool, I would like to understand the meaning of Size paramater. I use basic buy order, so I asume I expend all my money at any order.

thanks in advanced

You must be logged in to vote

Have you found size= described in the docs?

Replies: 1 comment 4 replies

Comment options

Have you found size= described in the docs?

You must be logged in to vote
4 replies
Comment options

ahhhhh
It is the number of stocks bought. SIZE = ActualCAsh/UnitStockPrice

Comment options

then, what do you represent with triangle size? it is not linked to trade size

Comment options

kernc Feb 7, 2023
Maintainer

Indeed, plot triangle size is proportional to trade size:

def _plot_pl_section():
"""Profit/Loss markers section"""
fig = new_indicator_figure(y_axis_label="Profit / Loss")
fig.add_layout(Span(location=0, dimension='width', line_color='#666666',
line_dash='dashed', line_width=1))
returns_long = np.where(trades['Size'] > 0, trades['ReturnPct'], np.nan)
returns_short = np.where(trades['Size'] < 0, trades['ReturnPct'], np.nan)
size = trades['Size'].abs()
size = np.interp(size, (size.min(), size.max()), (8, 20))
trade_source.add(returns_long, 'returns_long')
trade_source.add(returns_short, 'returns_short')
trade_source.add(size, 'marker_size')
Comment options

thanks Kernc for the explanation.

Thank you also for the great job

Answer selected by jjviton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /