MACD_Scout/Bot MACD Scalping.svg

90 lines
23 KiB
XML
Raw Permalink Normal View History

2025-11-14 10:14:48 +00:00
<?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="362px" preserveAspectRatio="none" style="width:1421px;height:362px;" version="1.1" viewBox="0 0 1421 362" width="1421px" zoomAndPan="magnify"><defs><filter height="300%" id="f68fwxn0e79lm" 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="409" x="509.5" y="16.708">UML Kelas - Scalping MACD + Slow Stochastic</text><!--MD5=[9fe984adeca50d574ae7000c770168e6]
class StrategyController--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="124.8281" id="StrategyController" style="stroke: #A80036; stroke-width: 1.5;" width="162" x="599.5" y="28.9531"/><ellipse cx="621.7" cy="44.9531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M624.6688,50.5938 Q624.0906,50.8906 623.45,51.0313 Q622.8094,51.1875 622.1063,51.1875 Q619.6063,51.1875 618.2781,49.5469 Q616.9656,47.8906 616.9656,44.7656 Q616.9656,41.6406 618.2781,39.9844 Q619.6063,38.3281 622.1063,38.3281 Q622.8094,38.3281 623.45,38.4844 Q624.1063,38.6406 624.6688,38.9375 L624.6688,41.6563 Q624.0438,41.0781 623.45,40.8125 Q622.8563,40.5313 622.2313,40.5313 Q620.8875,40.5313 620.2,41.6094 Q619.5125,42.6719 619.5125,44.7656 Q619.5125,46.8594 620.2,47.9375 Q620.8875,49 622.2313,49 Q622.8563,49 623.45,48.7344 Q624.0438,48.4531 624.6688,47.875 L624.6688,50.5938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="114" x="637.3" y="49.1074">StrategyController</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="600.5" x2="760.5" y1="60.9531" y2="60.9531"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="600.5" x2="760.5" y1="68.9531" y2="68.9531"/><ellipse cx="610.5" cy="79.9531" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="66" x="619.5" y="83.1636">onNewBar()</text><ellipse cx="610.5" cy="92.7578" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="116" x="619.5" y="95.9683">evaluateLongSetup()</text><ellipse cx="610.5" cy="105.5625" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="120" x="619.5" y="108.7729">evaluateShortSetup()</text><ellipse cx="610.5" cy="118.3672" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="98" x="619.5" y="121.5776">placeOrderLong()</text><ellipse cx="610.5" cy="131.1719" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="102" x="619.5" y="134.3823">placeOrderShort()</text><ellipse cx="610.5" cy="143.9766" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="136" x="619.5" y="147.187">manageOpenPositions()</text><!--MD5=[2dcabd1fb1d9a1fa227ff852eb929364]
class MACDModule--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="137.6328" id="MACDModule" style="stroke: #A80036; stroke-width: 1.5;" width="193" x="6" y="213.9531"/><ellipse cx="58.25" cy="229.9531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M61.2188,235.5938 Q60.6406,235.8906 60,236.0313 Q59.3594,236.1875 58.6563,236.1875 Q56.1563,236.1875 54.8281,234.5469 Q53.5156,232.8906 53.5156,229.7656 Q53.5156,226.6406 54.8281,224.9844 Q56.1563,223.3281 58.6563,223.3281 Q59.3594,223.3281 60,223.4844 Q60.6563,223.6406 61.2188,223.9375 L61.2188,226.6563 Q60.5938,226.0781 60,225.8125 Q59.4063,225.5313 58.7813,225.5313 Q57.4375,225.5313 56.75,226.6094 Q56.0625,227.6719 56.0625,229.7656 Q56.0625,231.8594 56.75,232.9375 Q57.4375,234 58.7813,234 Q59.4063,234 60,233.7344 Q60.5938,233.4531 61.2188,232.875 L61.2188,235.5938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="80" x="78.75" y="234.1074">MACDModule</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="198" y1="245.9531" y2="245.9531"/><ellipse cx="17" cy="256.9531" fill="none" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="104" x="26" y="260.1636">histogram: double</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="198" y1="266.7578" y2="266.7578"/><ellipse cx="17" cy="277.7578" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="112" x="26" y="280.9683">isAboveZero(): bool</text><ellipse cx="17" cy="290.5625" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="112" x="26" y="293.7729">isBelowZero(): bool</text><ellipse cx="17" cy="303.3672" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="151" x="26" y="306.5776">turnsUpBeforeZero(): bool</text><ellipse cx="17" cy="316.1719" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="167" x="26" y="319.3823">turnsDownBeforeZero(): bool</text><ellipse cx="17" cy="328.9766" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="102" x="26" y="332.187">reboundUp(): bool</text><ellipse cx="17" cy="341.7813" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="118" x="26" y="344.9917">reboundDown(): bool</text><!--MD5=[64573f4976ad330f4ea3e4c34e85ff8f]
class StochasticModule--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="124.8281" id="StochasticModule" style="stroke: #A80036; stroke-width: 1.5;" width="156" x="234.5" y="220.4531"/><ellipse cx="255.35" cy="236.4531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M258.3188,242.0938 Q257.7406,242.3906 257.1,242.5313 Q256.4594,242.6875 255.7563,242.6875 Q253.2563,242.6875 251.9281,241.0469 Q250.6156,239.3906 250.6156,236.2656 Q250.6156,233.1406 251.9281,231.4844 Q253.2563,229.8281 255.7563,229.8281 Q256.4594,229.8281 257.1,229.9844 Q257.7563,230.1406 258.3188,230.4375 L258.3188,233.1563 Q257.6938,232.5781 257.1,232.3125 Q256.5063,232.0313 255.8813,232.0313 Q254.5375,232.0313 253.85,233.1094 Q253.1625,234.1719 253.1625,236.2656 Q253.1625,238.3594 253.85,239.4375 Q254.5375,240.5 255.8813,240.5 Q256.5063,240.5 257.1,240.2344 Q257.6938,239.9531 258.3188,239.375 L258.3188,242.0938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="111" x="270.65" y="240.6074">StochasticModule</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="235.5" x2="389.5" y1="252.4531" y2="252.4531"/><ellipse cx="245.5" cy="263.4531" fill="none" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="52" x="254.5" y="266.6636">k: double</text><ellipse cx="245.5" cy="276.2578" fill="none" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="53" x="254.5" y="279.4683">d: double</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="235.5" x2="389.5" y1="286.0625" y2="286.0625"/><ellipse cx="245.5" cy="297.0625" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="254.5" y="300.2729">isOversold20(): bool</text><ellipse cx="245.5" cy="309.8672" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="130" x="254.5" y="313.0776">isOverbought80(): bool</text><ellipse cx="245.5" cy="322.6719" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="87" x="254.5" y="325.8823">crossUp(): bool</text><ellipse cx="245.5" cy="335.4766" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="103" x="254.5" y="338.687">crossDown(): bool</text><!--MD5=[80db1acc8a784e7b7f2739c70859ba13]
class EntryRules--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="73.6094" id="EntryRules" style="stroke: #A80036; stroke-width: 1.5;" width="206" x="425.5" y="245.9531"/><ellipse cx="491.25" cy="261.9531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M494.2188,267.5938 Q493.6406,267.8906 493,268.0313 Q492.3594,268.1875 491.6563,268.1875 Q489.1563,268.1875 487.8281,266.5469 Q486.5156,264.8906 486.5156,261.7656 Q486.5156,258.6406 487.8281,256.9844 Q489.1563,255.3281 491.6563,255.3281 Q492.3594,255.3281 493,255.4844 Q493.6563,255.6406 494.2188,255.9375 L494.2188,258.6563 Q493.5938,258.0781 493,257.8125 Q492.4063,257.5313 491.7813,257.5313 Q490.4375,257.5313 489.75,258.6094 Q489.0625,259.6719 489.0625,261.7656 Q489.0625,263.8594 489.75,264.9375 Q490.4375,266 491.7813,266 Q492.4063,266 493,265.7344 Q493.5938,265.4531 494.2188,264.875 L494.2188,267.5938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="66" x="511.75" y="266.1074">EntryRules</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="426.5" x2="630.5" y1="277.9531" y2="277.9531"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="426.5" x2="630.5" y1="285.9531" y2="285.9531"/><ellipse cx="436.5" cy="296.9531" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="174" x="445.5" y="300.1636">longEligible(macd, stoch): bool</text><ellipse cx="436.5" cy="309.7578" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="180" x="445.5" y="312.9683">shortEligible(macd, stoch): bool</text><!--MD5=[2776debe257112ff2ef6aa5086afcf96]
class RiskManager--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="112.0234" id="RiskManager" style="stroke: #A80036; stroke-width: 1.5;" width="333" x="667" y="226.9531"/><ellipse cx="789.25" cy="242.9531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M792.2188,248.5938 Q791.6406,248.8906 791,249.0313 Q790.3594,249.1875 789.6563,249.1875 Q787.1563,249.1875 785.8281,247.5469 Q784.5156,245.8906 784.5156,242.7656 Q784.5156,239.6406 785.8281,237.9844 Q787.1563,236.3281 789.6563,236.3281 Q790.3594,236.3281 791,236.4844 Q791.6563,236.6406 792.2188,236.9375 L792.2188,239.6563 Q791.5938,239.0781 791,238.8125 Q790.4063,238.5313 789.7813,238.5313 Q788.4375,238.5313 787.75,239.6094 Q787.0625,240.6719 787.0625,242.7656 Q787.0625,244.8594 787.75,245.9375 Q788.4375,247 789.7813,247 Q790.4063,247 791,246.7344 Q791.5938,246.4531 792.2188,245.875 L792.2188,248.5938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="80" x="809.75" y="247.1074">RiskManager</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="668" x2="999" y1="258.9531" y2="258.9531"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="668" x2="999" y1="266.9531" y2="266.9531"/><ellipse cx="678" cy="277.9531" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="300" x="687" y="281.1636">calcSL_Long(baseCandleLow, spreadPips=0): double</text><ellipse cx="678" cy="290.7578" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="307" x="687" y="293.9683">calcSL_Short(baseCandleHigh, spreadPips=1): double</text><ellipse cx="678" cy="303.5625" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="144" x="687" y="306.7729">tp1(pipsSL): double // 1R</text><ellipse cx="678" cy="316.3672" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="144" x="687" y="319.5776">tp2(pipsSL): double // 2R</text><ellipse cx="678" cy="329.1719" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="216" x="687" y="332.3823">positionSplit(): {first:0.8, second:0.2}</text><!--MD5=[c7aaa0abceb7ecc494eff36dbe67c885]
class OrderExecutor--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="112.0234" id="OrderExecutor" style="stroke: #A80036; stroke-width: 1.5;" width="192" x="1035.5" y="226.9531"/><ellipse cx="1082.25" cy="242.9531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1085.2188,248.5938 Q1084.6406,248.8906 1084,249.0313 Q1083.3594,249.1875 1082.6563,249.1875 Q1080.1563,249.1875 1078.8281,247.5469 Q1077.5156,245.8906 1077.5156,242.7656 Q1077.5156,239.6406 1078.8281,237.9844 Q1080.1563,236.3281 1082.6563,236.3281 Q1083.3594,236.3281 1084,236.4844 Q1084.6563,236.6406 1085.2188,236.9375 L1085.2188,239.6563 Q1084.5938,239.0781 1084,238.8125 Q1083.4063,238.5313 1082.7813,238.5313 Q1081.4375,238.5313 1080.75,239.6094 Q1080.0625,240.6719 1080.0625,242.7656 Q1080.0625,244.8594 1080.75,245.9375 Q1081.4375,247 1082.7813,247 Q1083.4063,247 1084,246.7344 Q1084.5938,246.4531 1085.2188,245.875 L1085.2188,248.5938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="90" x="1102.75" y="247.1074">OrderExecutor</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="1036.5" x2="1226.5" y1="258.9531" y2="258.9531"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1036.5" x2="1226.5" y1="266.9531" y2="266.9531"/><ellipse cx="1046.5" cy="277.9531" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="162" x="1055.5" y="281.1636">sendLong(entry, sl, tp1, tag)</text><ellipse cx="1046.5" cy="290.7578" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="166" x="1055.5" y="293.9683">sendShort(entry, sl, tp1, tag)</text><ellipse cx="1046.5" cy="303.5625" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="155" x="1055.5" y="306.7729">closePartial(ticket, percent)</text><ellipse cx="1046.5" cy="316.3672" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="157" x="1055.5" y="319.5776">moveSLToBreakeven(ticket)</text><ellipse cx="1046.5" cy="329.1719" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="112" x="1055.5" y="332.3823">setTarget(ticket, tp)</text><!--MD5=[1b172740686b1f3d726806f092f7c813]
class PositionManager--><rect fill="#FEFECE" filter="url(#f68fwxn0e79lm)" height="86.4141" id="PositionManager" style="stroke: #A80036; stroke-width: 1.5;" width="147" x="1263" y="239.9531"/><ellipse cx="1282.5" cy="255.9531" fill="#ADD1B2" rx="11" ry="11" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1285.4688,261.5938 Q1284.8906,261.8906 1284.25,262.0313 Q1283.6094,262.1875 1282.9063,262.1875 Q1280.4063,262.1875 1279.0781,260.5469 Q1277.7656,258.8906 1277.7656,255.7656 Q1277.7656,252.6406 1279.0781,250.9844 Q1280.4063,249.3281 1282.9063,249.3281 Q1283.6094,249.3281 1284.25,249.4844 Q1284.9063,249.6406 1285.4688,249.9375 L1285.4688,252.6563 Q1284.8438,252.0781 1284.25,251.8125 Q1283.6563,251.5313 1283.0313,251.5313 Q1281.6875,251.5313 1281,252.6094 Q1280.3125,253.6719 1280.3125,255.7656 Q1280.3125,257.8594 1281,258.9375 Q1281.6875,260 1283.0313,260 Q1283.6563,260 1284.25,259.7344 Q1284.8438,259.4531 1285.4688,258.875 L1285.4688,261.5938 Z "/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="105" x="1297.5" y="260.1074">PositionManager</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="1264" x2="1409" y1="271.9531" y2="271.9531"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1264" x2="1409" y1="279.9531" y2="279.9531"/><ellipse cx="1274" cy="290.9531" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="121" x="1283" y="294.1636">onTP1Reached(ticket)</text><ellipse cx="1274" cy="303.7578" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="121" x="1283" y="306.9683">onTP2Reached(ticket)</text><ellipse cx="1274" cy="316.5625" fill="#84BE84" rx="3" ry="3" style="stroke: #038048; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="93" x="1283" y="319.7729">onStopHit(ticket)</text><!--MD5=[159cc68cecb7019cd477abc0c88185b2]
link StrategyController to MACDModule--><path d="M599.45,106.4831 C505.03,124.4431 345.52,159.8631 216.5,213.9531 C212.29,215.7231 208.04,217.6231 203.79,219.6231 " fill="none" id="StrategyController-&gt;MACDModule" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="199.19,221.8331,209.0351,221.5619,203.7014,219.6774,205.5859,214.3436,199.19,221.8331" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[12f1682519e573e670c38544d72c153a]
link StrategyController to StochasticModule--><path d="M599.26,123.5431 C543.84,145.9731 469.52,178.4431 407.5,213.9531 C403.43,216.2831 399.32,218.7531 395.21,221.3031 " fill="none" id="StrategyController-&gt;StochasticModule" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="390.75,224.1131,400.5007,222.7263,394.9876,221.4593,396.2546,215.9461,390.75,224.1131" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[0d674cef8002111ee1d10936e6703056]
link StrategyController to EntryRules--><path d="M631.15,153.9831 C608.03,182.8031 581.14,216.3231 560.68,241.8331 " fill="none" id="StrategyController-&gt;EntryRules" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="557.46,245.8531,566.2118,241.3358,560.5887,241.953,559.9715,236.3299,557.46,245.8531" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[d3c5cd48b01282ee3b55cf897aa4e482]
link StrategyController to RiskManager--><path d="M730.17,153.9831 C748,176.0531 768.05,200.8931 785.71,222.7631 " fill="none" id="StrategyController-&gt;RiskManager" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="788.98,226.8131,786.4302,217.3,785.8357,222.9256,780.2101,222.331,788.98,226.8131" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[195e52b5c49c62fd9fe3e232f25063ff]
link StrategyController to OrderExecutor--><path d="M761.58,116.8431 C830.95,138.8531 932.75,173.8531 1017.5,213.9531 C1024.27,217.1531 1031.16,220.6431 1038.03,224.2831 " fill="none" id="StrategyController-&gt;OrderExecutor" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="1042.78,226.8331,1036.7552,219.042,1038.3786,224.4609,1032.9596,226.0843,1042.78,226.8331" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[56ecb1e37c1c584610807514f9c123ae]
link StrategyController to PositionManager--><path d="M761.57,98.9231 C874.45,110.3331 1083.38,140.2331 1245.5,213.9531 C1258.61,219.9131 1271.65,228.0131 1283.59,236.5331 " fill="none" id="StrategyController-&gt;PositionManager" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="1287.93,239.6931,1282.9737,231.1823,1283.8759,236.7667,1278.2914,237.6689,1287.93,239.6931" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[4900c1746cd75404dd35f26c386139ed]
@startuml
title UML Kelas - Scalping MACD + Slow Stochastic
class StrategyController {
+onNewBar()
+evaluateLongSetup()
+evaluateShortSetup()
+placeOrderLong()
+placeOrderShort()
+manageOpenPositions()
}
class MACDModule {
+histogram: double
+isAboveZero(): bool
+isBelowZero(): bool
+turnsUpBeforeZero(): bool
+turnsDownBeforeZero(): bool
+reboundUp(): bool
+reboundDown(): bool
}
class StochasticModule {
+k: double
+d: double
+isOversold20(): bool
+isOverbought80(): bool
+crossUp(): bool
+crossDown(): bool
}
class EntryRules {
+longEligible(macd, stoch): bool
+shortEligible(macd, stoch): bool
}
class RiskManager {
+calcSL_Long(baseCandleLow, spreadPips=0): double
+calcSL_Short(baseCandleHigh, spreadPips=1): double
+tp1(pipsSL): double // 1R
+tp2(pipsSL): double // 2R
+positionSplit(): {first:0.8, second:0.2}
}
class OrderExecutor {
+sendLong(entry, sl, tp1, tag)
+sendShort(entry, sl, tp1, tag)
+closePartial(ticket, percent)
+moveSLToBreakeven(ticket)
+setTarget(ticket, tp)
}
class PositionManager {
+onTP1Reached(ticket)
+onTP2Reached(ticket)
+onStopHit(ticket)
}
StrategyController ..> MACDModule
StrategyController ..> StochasticModule
StrategyController ..> EntryRules
StrategyController ..> RiskManager
StrategyController ..> OrderExecutor
StrategyController ..> PositionManager
@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>