37 lines
11 KiB
XML
37 lines
11 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="635px" preserveAspectRatio="none" style="width:795px;height:635px;" version="1.1" viewBox="0 0 795 635" width="795px" zoomAndPan="magnify"><defs><filter height="300%" id="f30b87uhapp6p" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="294" x="246" y="26.708">Sequence - Eksekusi & Exit 80/20</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="33" x2="33" y1="121.25" y2="547.9766"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="140" x2="140" y1="121.25" y2="547.9766"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="384.5" x2="384.5" y1="121.25" y2="547.9766"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="507.5" x2="507.5" y1="121.25" y2="547.9766"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="711" x2="711" y1="121.25" y2="547.9766"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="45" x="8" y="117.9482">Trader</text><ellipse cx="33.5" cy="47.9531" fill="#FEFECE" filter="url(#f30b87uhapp6p)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/><path d="M33.5,55.9531 L33.5,82.9531 M20.5,63.9531 L46.5,63.9531 M33.5,82.9531 L20.5,97.9531 M33.5,82.9531 L46.5,97.9531 " fill="none" filter="url(#f30b87uhapp6p)" style="stroke: #A80036; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="45" x="8" y="559.9717">Trader</text><ellipse cx="33.5" cy="573.2734" fill="#FEFECE" filter="url(#f30b87uhapp6p)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/><path d="M33.5,581.2734 L33.5,608.2734 M20.5,589.2734 L46.5,589.2734 M33.5,608.2734 L20.5,623.2734 M33.5,608.2734 L46.5,623.2734 " fill="none" filter="url(#f30b87uhapp6p)" style="stroke: #A80036; stroke-width: 2.0;"/><rect fill="#FEFECE" filter="url(#f30b87uhapp6p)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="138" x="69" y="85.9531"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="124" x="76" y="105.9482">StrategyController</text><rect fill="#FEFECE" filter="url(#f30b87uhapp6p)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="138" x="69" y="546.9766"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="124" x="76" y="566.9717">StrategyController</text><rect fill="#FEFECE" filter="url(#f30b87uhapp6p)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="103" x="331.5" y="85.9531"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="89" x="338.5" y="105.9482">RiskManager</text><rect fill="#FEFECE" filter="url(#f30b87uhapp6p)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="103" x="331.5" y="546.9766"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="89" x="338.5" y="566.9717">RiskManager</text><rect fill="#FEFECE" filter="url(#f30b87uhapp6p)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="114" x="448.5" y="85.9531"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="100" x="455.5" y="105.9482">OrderExecutor</text><rect fill="#FEFECE" filter="url(#f30b87uhapp6p)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5
|
||
|
|
@startuml
|
||
|
|
title Sequence - Eksekusi & Exit 80/20
|
||
|
|
|
||
|
|
actor Trader
|
||
|
|
participant StrategyController as SC
|
||
|
|
participant RiskManager as RM
|
||
|
|
participant OrderExecutor as EX
|
||
|
|
participant PositionManager as PM
|
||
|
|
|
||
|
|
Trader -> SC: onNewBar()
|
||
|
|
SC -> RM: hitung SL/TP berdasar base candle
|
||
|
|
RM - -> SC: SL, TP1=1R, TP2=2R
|
||
|
|
SC -> EX: kirim order (LONG/SHORT) dgn SL, TP1
|
||
|
|
EX - -> SC: ticket
|
||
|
|
|
||
|
|
== Saat TP1 Tercapai ==
|
||
|
|
EX -> PM: TP1 hit (ticket)
|
||
|
|
PM -> EX: closePartial(ticket, 80%)
|
||
|
|
PM -> EX: moveSLToBreakeven(ticket)
|
||
|
|
PM -> EX: setTarget(ticket, TP2=2R)
|
||
|
|
|
||
|
|
== Saat TP2 Tercapai atau Stop ==
|
||
|
|
EX -> PM: TP2 hit atau Stop hit
|
||
|
|
PM - -> SC: posisi selesai
|
||
|
|
@enduml
|
||
|
|
|
||
|
|
PlantUML version 1.2020.08(Sun Apr 26 14:08:22 UTC 2020)
|
||
|
|
(GPL source distribution)
|
||
|
|
Java Runtime: OpenJDK Runtime Environment
|
||
|
|
JVM: OpenJDK 64-Bit Server VM
|
||
|
|
Java Version: 1.8.0_402-heroku-b06
|
||
|
|
Operating System: Linux
|
||
|
|
Default Encoding: UTF-8
|
||
|
|
Language: en
|
||
|
|
Country: US
|
||
|
|
--></g></svg>
|