@@ -145,7 +145,7 @@ def init():
145
145
if not is_arraylike or not 1 <= value .ndim <= 2 or value .shape [- 1 ] != len (self ._data .Close ):
146
146
raise ValueError (
147
147
'Indicators must return (optionally a tuple of) numpy.arrays of same '
148
- f'length as `data` (data shape: { self ._data .Close .shape } ; indicator "{ name } "' \
148
+ f'length as `data` (data shape: { self ._data .Close .shape } ; indicator "{ name } "'
149
149
f'shape: { getattr (value , "shape" , "" )} , returned value: { value } )' )
150
150
151
151
if plot and overlay is None and np .issubdtype (value .dtype , np .number ):
@@ -424,8 +424,8 @@ def size(self) -> float:
424
424
"""
425
425
Order size (negative for short orders).
426
426
427
- If size is a value between 0 and 1, it is interpreted as a fraction of current
428
- available liquidity (cash plus `Position.pl` minus used margin).
427
+ If size is a value between 0 and 1, it is interpreted as a fraction
428
+ of current available liquidity (cash plus `Position.pl` minus used margin).
429
429
A value greater than or equal to 1 indicates an absolute number of units.
430
430
"""
431
431
return self .__size
@@ -705,12 +705,12 @@ def new_order(self,
705
705
706
706
if is_long :
707
707
if not (sl or - np .inf ) <= (limit or stop or self .last_price ) <= (tp or np .inf ):
708
- raise ValueError (f"Long orders require:"
709
- f"SL ({ sl } ) < LIMIT ({ limit or stop or self .last_price } ) < TP ({ tp } )" )
708
+ raise ValueError (f"Long orders require: "
709
+ f"SL ({ sl } ) < LIMIT ({ limit or stop or self .last_price } ) < TP ({ tp } )" )
710
710
else :
711
711
if not (tp or - np .inf ) <= (limit or stop or self .last_price ) <= (sl or np .inf ):
712
- raise ValueError (f"Short orders require: "
713
- f"TP ({ tp } ) < LIMIT ({ limit or stop or self .last_price } ) < SL ({ sl } )" )
712
+ raise ValueError (f"Short orders require: "
713
+ f"TP ({ tp } ) < LIMIT ({ limit or stop or self .last_price } ) < SL ({ sl } )" )
714
714
715
715
order = Order (self , size , limit , stop , sl , tp , trade )
716
716
# Put the new order in the order queue,
0 commit comments