djmad

Liquidation_lines

djmad 업데이트됨   
Library "Liquidationline"


f_calculateLeverage(_leverage, _maintainance, _value, _direction)
  Parameters:
    _leverage
    _maintainance
    _value
    _direction

f_liqline_update(_Liqui_Line, _killonlowhigh)
  Parameters:
    _Liqui_Line
    _killonlowhigh

f_liqline_draw(_Liqui_Line, _priceorliq)
  Parameters:
    _Liqui_Line
    _priceorliq

f_liqline_add(_Liqui_Line, linetoadd, _limit)
  Parameters:
    _Liqui_Line
    linetoadd
    _limit

Liquidationline
  Fields:
    creationtime
    stoptime
    price
    leverage
    maintainance
    line_active
    line_color
    line_thickness
    line_style
    line_direction
    line_finished
    text_active
    text_size
    text_color

this library can draw typical liquidation lines, which can be called e.g. by indicator signals
You can see the default implementation in the lower part of the code, starting with RUNTIME
Don't forget to increase max lines to 500 in your script.
It can look like this screenshot here, with only minor changes to your executing script.
The base is the same

릴리즈 노트:
v2
Runtime Demo update, no function changes
릴리즈 노트:
This update mainly does 2 things:

Deleting lines which are just wasting free lines (selectable min length, -1 to disable (standard value in the function)

Speeding up the runtime by filtering doublegets inside the liqline_update by a additional if branche for preselection
gets are slow, so why calculate when not needed.

small fixes:
typo on bollinger block always requesting BB Nr. 1 instead of 1 2 3

v3

Added:
f_getbartime()
this does give you the average time per bar from a sample of 100 bars

Updated:
f_liqline_update(_Liqui_Line, _killonlowhigh, _minlength, _timeperbar)
  Parameters:
    _Liqui_Line (Liquidationline)
    _killonlowhigh (bool)
    _minlength (int)
    _timeperbar (float)
minlength and timeperbar is added but not needed to function correctly.
aware this adds some repainting behavior as it deletes lines after detecting

Trader & coder. TA & NFTs.
bitblockwizard.com more at bitblockart.com
파인 라이브러리

트레이딩뷰 정신에 따라 오써는 이 파인 코드를 오픈 소스 라이브러리로 퍼블리쉬하여 당사 커뮤니티의 다른 파인 프로그래머들이 쓸 수 있도록 하였습니다. 오써에게 찬사를! 여러분은 이 라이브러리를 프라이빗 또는 오픈 소스 퍼블리케이션에 쓸 수 있지만 퍼블리케이션에 재사용은 하우스룰을 따릅니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

이 라이브러리를 쓰시겠습니까?

텍스트를 클립보드에 카피한 뒤 님의 스크립트에 붙여 넣기.

연관 아이디어