Automate on Hyperliquid - Strategy Webhook Template [HYPR-run]DESCRIPTION
You define the entry signal. The system manages everything after the fill. This is a production-grade trade system for automating strategies on Hyperliquid using PulseWire webhooks. Five-level priority chain trade system. Four ATR trailing architectures including volume-weighted ATR with Efficiency Ratio scaling and ratchet floor. Smart stops that exit when a trade is invalidated. Pyramid scaling into winners and a redundant failsafe stop.
Three signal systems are included ready to backtest and deploy (EMA crossover, Turtle breakout, SFP - Swing Failure Pattern) that you can toggle on/off independently; replace or extend them with your own logic in three places: the input toggle, the signal condition, and the priority chain entry call. There are clear landmarks in the code to make it as straightforward as possible.
This strategy is built for you to hit the ground running backtesting or automating with a systematic framework to execute around your entry logic or the example signals provided. All signals fire on confirmed bar closes only. Entries, exits, pyramids, and stops are evaluated at close, not during the bar, so intrabar wick spikes do not trigger the system. This is by design. No lookahead bias: all highest/lowest references use prior-bar offsets, LinReg is calculated with offset=1, and no security() calls are used. The script does not repaint or compound returns.
WHAT THE STRATEGY SYSTEMIZES
1. Five-Level Priority Action Chain
Entries fire first. Pyramids fire second and block exits on the same bar. Trailing exits ride winners. Smart stops catch failing trades early. Failsafe stop is the absolute floor. The if/else order is intentional and prevents conflicts so that every action occurs only when it should.
2. Four ATR Trailing Stop Modes
Select from a dropdown. All use separate long/short look backs and multipliers because drops are faster than rallies; the defaults reflect this asymmetry.
• A3.1: LinReg + plain ATR, no ratchet. Baseline for comparison.
• A4.0 (default): LinReg + volume-weighted ATR + Efficiency Ratio + ratchet. VWATR discounts low-volume bars. ER tightens in chop (0.8x), widens in trend (1.2x). Ratchet means the stop only moves in your favor.
• A4.1: Chandelier + VWATR + ratchet + first-bar multiplier for tighter initial protection.
• A4.2: LinReg + VWATR, no ratchet or ER. Stop moves freely with projection.
***The multipliers determine how much room the stop gives price before triggering. They have the greatest influence on overall system performance and must be tuned to the asset and timeframe being traded. Default values are a starting point, not final settings.
• L Multi: 4.0 (long stop distance). Wider because uptrends are slower and require more room.
• S Multi: 2.0 (short stop distance). Tighter because drops are faster and corrections are sharper.
• Long LB: 14 bars. ATR lookback for long stops.
• Short LB: 26 bars. ATR lookback for short stops; longer lookback smooths volatile short-side moves.
• LinReg LB: 10 bars. LinReg projection window (A3.1, A4.0, A4.2).
• First Bar Mult: 1.5x (A4.1 only). Tighter stop on the entry bar; expands to standard multiplier after.
3. Smart Stops
Two trigger paths, both requiring open P&L below threshold (default -3.5%): (1) price crosses under the trailing stop while losing, or (2) price breaks the entry bar’s structure while losing. Either path exits the trade before the failsafe would trigger. The P&L condition on both paths prevents exits on noise when the trade is still within normal range.
4. Pyramid Entries
Scales into winning trades on 5-bar extremes. Requires full bar confirmation and must be within 13 bars of the initial entry.
5. Basic Entry Quality Filters
Applied automatically to every entry:
• Wick nullification: bars with wicks > 38.2% of range block entries in that direction
• SFP nullification: active reversal patterns block opposing entries
• Full bar filter: candle body must be >= 66.6% of total range
• Bar confirmation: entries only fire on confirmed bars
THREE SIGNALS INCLUDED (replace or extend)
• XO/XU: EMA crossover with four configurable pairs (5/13, 9/26, 12/25, 26/128). Requires price above swing high (longs) or below swing low (shorts) plus volume spike (Dropdown Selection).
• Turtle: 13/26 bar breakout with Lost Trade System logic. First breakout after an opposing signal gets priority.
• SFP: Swing Failure Pattern. Longs fire on either 5/5 with full-body confirmation or 5/2 with bullish candle confirmation and strong volume spike (1.618x average). Shorts fire on 5/5 with full-body or 13/3 with bearish candle confirmation. Dual-path per direction allows the signal to catch both high-conviction structure failures and high-volume reversals. The function accepts any left/right look back combination, making it straightforward to adapt. (#/# refers to pivot look back left and right)
Each has its own toggle. Enable one, combine them, or swap in your own signals.
WEBHOOK AUTOMATION
Every fill event fires through PulseWire’s built-in webhook system when enabled: entries, exits, pyramids, smart stops, and failsafe closes. To execute those webhooks on Hyperliquid, an intermediary service (execution layer) that accepts PulseWire webhooks and routes orders to Hyperliquid's API is required.
Setup:
1. Create an alert on this strategy
2. Set trigger to "Order fills only"
3. Check Webhook URL, paste your endpoint
4. Message box: {"ticker":"{{ticker}}","position":"{{strategy.market_position}}"}
5. Set expiration to Open-ended
The snippet will most likely require customization depending on your execution layer. The {{ticker}} and {{strategy.market_position}} fields are PulseWire placeholders that auto-populate when a strategy signal fires.
We recommend referencing PulseWire’s Strategy Alerts documentation to fully understand placeholder use and function when setting up your snippet for your execution layer: www.pulsewire.com
BUILDING WITH YOUR OWN SIGNALS
The most straightforward path is adding your own entry logic. The ATR module, smart stops, and pyramids can also be edited to preferred logic while still leveraging the systemized structure for clean execution when automating on an exchange.
Option 1: Replace an existing signal. Find its section under the SIGNALS header (look for "EXAMPLE 1", "EXAMPLE 2", or "EXAMPLE 3"). Delete the example code and write your condition in its place. Find the matching entry in the STRATEGY CALLS priority chain and swap the condition variable. The toggle still works; rename its label in the input line. Everything downstream works automatically.
Option 2: Add a new signal. Three places to touch:
1. Copy a strategy toggle line from the STRATEGIES input group, change the variable name and label
2. Add your signal logic in the SIGNALS section as a boolean
3. Add an else-if block in the STRATEGY CALLS priority chain using your toggle as the gate
Two test switches (Tsw1, Tsw2) are reserved in Settings for custom signals.
READING THE CHART
Candles are colored by direction: black bodies up, gray bodies down (Quant Filter toggle).
The trailing stop draws as a colored line following your position: green below price when long, red/orange above price when short. A gradient fill shades the zone between price and the stop; it intensifies as price approaches the exit level.
Green dots on the long stop line and red dots on the short stop line are ratchet markers (A4.0 and A4.1 only). Each dot means the stop locked in a new level and will not pull back.
Entry labels appear at each fill: "xoL" (EMA long), "xuS" (EMA short), "tL" (Turtle long), "tS" (Turtle short), "sfpL"/"sfpS" (SFP entries), "pyrL"/"pyrS" (pyramid adds). Exit labels: "Cl"/"Cs" (trailing close long/short), "smrtstp" (smart stop), "fstp" (failsafe).
SFP candle wicks are color-coded by lookback: 5/5 bull wick = bright green, 5/2 bull wick = dark green, 5/5 bear wick = bright red, 13/3 bear wick = dark red. The shade tells you which configuration triggered — brighter means the more common 5/5 detection, darker means the secondary lookback fired.
Horizontal lines extending from entry price are the Late Entry Window: white solid line is entry price, green dashed line is entry + ATR window, red dashed line is entry - ATR window. Visual reference only; does not affect trade logic. Useful when away from the screen to quickly see if a missed entry is still within a safe ATR range.
Market structure labels (HH, LH, HL, LL) appear at swing pivots when the Structure toggle is enabled.
RISK MATH
Order size is fixed at $5,000 (50% of starting capital). That means it's always a flat $5k order, no compounding. With the failsafe at -5.25%, maximum loss per trade is $262.50, or 2.625% of the $10,000 starting balance.
*Because order size is fixed in dollars while equity grows, risk as a percentage of equity decreases over time: 2.625% at start, 2.1% at $12,500, 1.75% at $15,000. The smart stop triggers before the failsafe in most cases, reducing average realized loss further.
STRATEGY PROPERTIES (What's used in the chart published here)
Strategies (all off by default - toggle on to activate):
• XO/XU: on
• Turtle: on
• SFP: on
Settings:
• Mode: Historical (switch to Bot Mode for live automation - limits calculation depth for speed)
• EMA Pair: 9/26
Risk Management:
• Smart Stop: on | -3.5%
• Failsafe Stop: on | -5.25%
• Mech TP/Cls: on
ATR Trailing Exits:
• Mode: A4.0
• L Multi: 4.0 | S Multi: 2.0
• Lng LB: 14 | Shrt LB: 26
• LinReg: 10 | First Bar: 1.5 (A4.1 only)
Backtest Properties:
• Initial capital: $10,000
• Commission: 0.05%
• Slippage: 2 ticks
• Order size: $5,000 (cash, fixed)
• Fill limit assumption: 5 ticks
• Max risk per trade: $262.50 (2.625% of starting equity)
CREDITS
ATR: J. Welles Wilder (1978).
Efficiency Ratio: Perry Kaufman.
Turtle breakout concept: Richard Donchian. Strategy

Multi-Factor Regime Scoring & Alerts [HYPR-run]DESCRIPTION:
Composite regime scoring system that fuses eight independent market dimensions into a single normalized Regime Factor (-1 to +1). The sweet spot is the +/-0.2 zone: when the Regime Factor crosses through this zone (dim white circles on chart), the regime just shifted from one side to the other through neutral. That crossover, with the HMA-smoothed Regime Curve sloping in the same direction, is the highest-conviction entry the composite produces. The alerts are built around this: Regime Pivot fires at +/-0.25 with volatility band confirmation.
DISCOVERING EDGE
Pursuing a mechanical edge in entry/exit timing, confirmation and conviction sizing led us to developing an oscillating expression of most of the key criteria we use in building automated strategies. We discovered there is a sweet-spot for higher conviction trades in the +/-0.2 - .+/-0.3 zone. For example if a SFP presents, waiting for the REGIME Factor to enter the zone has a higher probability of trending than if taken earlier. In addition, for earlier reversion trades, XO/XU the outer most levels of +/-0.6 are excellent early entries when following a disciplined sizing methodology.
EIGHT SCORING DIMENSIONS
1. Macro Pivot (+/-10): ROC regime exhaustion into inflection
2. ROC Filter (+/-9): layered rate of change momentum states
3. ADXVMA (+/-9): adaptive trend direction with regime gradient
4. OBVIX (+/-5): on-balance volume, volatility, and trend composite
5. Convergence (+/-7): multi-timeframe alignment across 7 timeframes
6. Mean Reversion (+/-10): blow-off detection and spike revert signals
7. Levels (+/-8): positioning relative to 50d, 200d, 10w moving averages
8. Mechanical Hold (+/-5): price action hold signals with squeeze detection
Macro pivot and mean reversion (+/-10 each) are the heaviest. When both fire in the same direction, they swing the composite by nearly a third of its total range.
HOW TO USE
Add to chart, adjust ADXVMA and Turtle periods to match your setup. Read the Regime Factor, not the price. Above +0.6 = strong bullish; XO/XU these levels for early starter positions. Below -0.6 = strong bearish. The +/-0.2 zone is the sweet spot: crossovers here (dim white circles) mark high-probability entries or confirmation to other set-ups like an SFP. The Regime Curve shows the trend of the regime itself; when the curve slopes against the score, the regime is decelerating.
When the composite is ambiguous (between 0.2 and 0.6), the dashboard tells you why. Macro pivot green but ROC filter yellow = inflection detected, momentum hasn't confirmed. Convergence bright green but ADXVMA yellow = multi-TF aligned but local MA still flat.
CROSS-DIMENSIONAL READS
The power is reading 2-3 dashboard rows together:
- Macro pivot firing while ROC filter still green = earliest warning of trend exhaustion
- "Macro Lc confirmed" + convergence at +5 or higher = highest-conviction reversal entry
- ADXVMA "Early Bull" + convergence at +5 = trend birth signal
- Convergence at +7 = strongest trend confirmation AND trigger for mean reversion detection. Maximum agreement = maximum overextension risk
- "Blow-Off" + "Hodl S" = hold confirmed but reversion loading against you; tighten
- "Legit Squeeze" + "Chopperoni" + convergence +/-5 = compressed energy, directional break coming
- Regime Factor +0.7 but Curve flattening = regime decelerating; leading signal of rollover
ALERTS
Regime Pivot fires when the Regime Factor crosses +/-0.25 with volatility band confirmation; solid arrows on chart. Built around the sweet spot: fires at the regime shift, not after the move has run. Spike Revert fires on mean reversion after blow-off; counter-trend edge from extreme overextension. Toggle each independently. For notifications without webhooks: condition = this indicator, "Any alert() function call", select push/email/popup. For webhook execution: paste endpoint URL, set Open-ended, create.
REGIME FACTOR THRESHOLD ZONES
+0.6 to +1.0 strong bullish (solid green hline)
+0.2 to +0.6 moderate bullish (dotted line)
-0.2 to +0.2 sweet spot entries (dim white circles); XO/XU here
-0.6 to -0.2 moderate bearish (dotted line)
-1.0 to -0.6 strong bearish (solid red hline)
DASHBOARD (9 rows)
1. MACRO PIVOT - Green: Pivoting ↑, Lc ↗ (confirmed), L In Play ↗. Red: inverse. Black: neutral.
2. ROC FILTER - Bright Green: Momentum ↑. Green: Trending ↗ / Rolling Over ↓. Yellow: Continuation / Stage 1 / Reversion. Orange: Exhaustion. White: Sideways. Red/Bright Red: inverse.
3. ADXVMA - Green: D Trend ↗, Trending ↗, Early Bull. Yellow: Pivoting, Consolidation, Chopperoni. Red: inverse.
4. OBVIX - Green: positive. Red: negative. Black: flat.
5. CONVERGENCE - Bright Green: All Lined Up ↑ (7/7). Gradient green: +5 to +6. Dim: +3 to +4. Black: near 0. Red gradient: inverse.
6. MEAN REVERSION - Yellow: Blow-Off, High Potential, Possible. Green: Spike Revert ↑ / MR In Play ↗. Red: inverse.
7. LEVELS - Green: Bouncing key MAs, XO events. Red: Rejecting, XU events. MA combo: above/below 50d, 100d, 200d + 10w anchor.
8. MECHANICAL HOLD - Squeeze gradient: Legit Squeeze / Squeezing. Green: Hodl L. Red: Hodl S. Black: Get Ready / Neutral.
9. REGIME FACTOR - Composite score with gradient color and numeric display.
CREDITS
ADXVMA: Linnsoft
ADX: J. Welles Wilder (1978)
VIDYA: Tushar S. Chande, TASC March 1992
Advance/Decline gradient: LucF
Turtle breakout concept: Richard Donchian Indicator

Open Interest Flow & Context Overlay [HYPR-run]DESCRIPTION:
Reads Binance perpetual open interest and classifies each bar into one of eight context states based on OI direction, price direction, and volume direction. Flow arrows show how open interest is developing bar by bar; the context matrix tells you what it means. OI rising + price rising + volume rising = new longs with conviction. OI rising + price falling + volume rising = new shorts with conviction. OI falling + price falling = long squeeze (liquidation, trend acceleration). OI falling + price rising + volume = short squeeze (covering, trend acceleration). The matrix answers: who is entering, who is exiting, and is volume confirming?
DISCOVERING EDGE
This indicator classifies every bar into eight context states by combining OI direction, price direction, and volume direction into a single read. In order to gain a persistent, mechanical edge in distinguishing real demand from forced covering and genuine selling from liquidation, we explored a more meaningful expression of open interest flow that resulted in strong confirmation signals that became actual entry/exit signals (Large Outline Triangles on chart) in our latest automated strategies.
8 OI CONTEXT STATES vs RAW OI CANDLES
Raw OI rising tells you positions are opening but not who or why. Eight context states (new longs with volume, short squeeze, long liquidation, etc.) answer who is entering, who is exiting, and whether volume confirms, turning a single data stream into actionable positioning context. Arrow color hierarchy gives the instant read: green/bright red = fresh direction flip (highest conviction); cyan/orange = continuation; purple = no volume confirmation (lower conviction but a staple of grinding price action in intermediate trend. Dashboard distinguishes "LONG, New Longs + Volume" from "Short Squeeze, Accumulation"; both show price rising, but one is real demand and the other is forced covering that ends when covering is done. Alerts fire only on strong OI signals (OI + price + volume all aligned) with full bar filter and directional candle confirmation; three layers of filtering before the signal fires.
FEATURES
- Eight OI context states with color-coded overlay arrows
- Two-row dashboard: OI context state + OI flow arrows with color badges
- Strong/weak filter: price + volume + OI alignment required for full signals
- Direction flip tracking: fresh signals vs continuation (brighter vs dimmer)
- ZLEMA-based trend detection (smoother than raw crossovers)
- Webhook-ready alerts on strong OI signals with full bar filter
- Full bar filter: body >= 66.6% of range (no doji fakeouts)
DASHBOARD
Two-row display: OI context state and OI flow. Row 1 classifies the current bar from the eight-state matrix. Row 2 shows the active flow arrow state matching the arrows on chart.
OI CONTEXT TABLE (Dashboard row 1)
OI FLOW TABLE (Dashboard row 2)
HOW IT WORKS
ZLEMA (zero-lag EMA) detects rising/falling direction on three inputs: open interest, price, and volume. The combination determines the context state. Strong signals require all three aligned. A fixnan state variable tracks direction flips to distinguish fresh entries from continuation. OI data is pulled from Binance perpetual contracts (USDT or coin-margined). Auto-detects the coin from the chart symbol, or enter manually for non-Binance tickers.
ALERTS
Fires on strong OI long/short signals (all three aligned) with a full directional bar. Fresh direction flips are distinguished from continuation. Alert payload is built into the script; works with any webhook receiver.
CREDITS
OI data approach: ByzantiumScripts, spacemanbtc
Indicator

OBV Linear Regression Multi-Slope [HYPR-run]DESCRIPTION:
Three linear regression slopes fitted to On-Balance Volume. Measures whether accumulation or distribution is accelerating, decelerating, or reversing across short, medium, and long lookbacks simultaneously. Raw OBV tells you the cumulative direction of volume flow. Fitting a linear regression to it gives you the rate of change: the slope. Three slopes at different lookbacks show the structure of volume commitment. When all three agree, volume flow is structurally committed in one direction. When they disagree, the timeframes are in conflict.
DISCOVERING EDGE
Dual and triple slope alignment has proven to be a staple confirmation signal in our most reliable automated strategies for both entries and exits. When two or three independent lookbacks agree on the direction of volume flow, the commitment is structural, not noise. When alignment breaks, the first slope to flip tells you exactly where conviction cracked. We built this indicator to surface that alignment as a first-class signal rather than something you eyeball across separate panes.
THREE LR SLOPES vs RAW OBV LINE
Three slopes at different lookbacks show whether all timeframes of volume flow agree or conflict. Dual alignment (short + long) is the entry signal; triple (all three) confirms later for pyramids. When triple breaks, that's the exit. Values above 0.3 mean the slope is steeper than one standard deviation per bar (very strong trend). Sigma/bar above 0.1 means the slope is statistically strong; below 0.05 is weak.
FEATURES
- Three linear regression slope lines on OBV (short 9, medium 26, long 50)
- Optional adaptive short lookback (ATR-scaled for low timeframes)
- Slope alignment detection: dual (short+long) and triple (all three)
- Universal angle normalization (slope/sigma x 45 degrees)
- Sigma/Bar ratio: slope strength relative to OBV noise
- Auto-adjusts all lookbacks by timeframe (weekly/monthly compress)
- Webhook alerts on slope flip or triple alignment
- Full bar filter rejects doji/wick-heavy bars
- Dashboard with lookback, angle, and sigma/bar for all three lines
HOW IT WORKS
Linear regression calculates the best-fit line through OBV values over a lookback window. The slope of that line is the rate of volume flow. Positive slope = accumulation accelerating. Negative slope = distribution accelerating. The universal angle normalizes raw slope by OBV standard deviation so the dashboard reads consistently across any asset (BTC's OBV in millions, a low-cap's in thousands, same angle scale).
UNIVERSAL ANGLE
Slope divided by OBV standard deviation per bar, multiplied by 45. A value of 45 degrees means the slope equals one standard deviation per bar. Makes angle comparable across any asset and timeframe: 30 degrees on BTC means the same relative strength as 30 degrees on SOL.
ALERT MODES
Slope Flip: fires when selected lookback crosses zero. Negative to positive = accumulation starting (LONG). Positive to negative = distribution starting (SHORT). Triple Alignment: fires when all three slopes agree on direction. Fewer signals, higher conviction. Alert payload is built into the script as JSON; works with any webhook receiver.
CREDITS
On-Balance Volume: Joseph Granville, Granville's New Key to Stock Market Profits (1963) Indicator

ROC Regime Filter [HYPR-run]DESCRIPTION:
A reliable universal regime filter across all assets, all timeframes. Rate of change filter that classifies price action into regime states. A suite of smoothed EMAs feeds a layered ROC engine that detects when fast momentum aligns with, or diverges from, slow structure. The filter measures; it doesn't predict. When all ROC layers stack in the same direction (parallel alignment), the trend is confirmed by arithmetic. When fast ROC diverges from slow, the regime shifts. The lag is the cost of certainty. Sweet spot is 1hr to 1D; lower timeframes get noisy.
DISCOVERING EDGE
In order to gain a persistent, mechanical edge in which trades are permitted and which are filtered out, we explored a more meaningful expression of regime classification using layered multiple ROC periods to detect when fast momentum aligns with or diverges from slow structure. This resilient regime filter has been the backbone for our automated strategies since 2021.
LAYERED ROC vs SINGLE-INDICATOR REGIME
A single RSI or ADX reading flattens the market into binary (trending/not trending). Layered ROC alignment separates six distinct states, each with different permissible trade types, so the filter matches the complexity of what the market is actually doing. Six regime states gate every decision; the combination of regime color + ROC slope is the trade filter, not either one alone. Phase transitions (green to yellow, orange to green) are the actionable signals; static states just confirm what's already happening. Webhook alerts fire on macro pivots (accumulation/distribution inflections) at the regime transition, not after the move has run.
FEATURES
- Six regime states from layered ROC alignment (see color legend below)
- Early trend detection when all layers accelerate in parallel
- ROC 200 line with regime-colored gradient fill
- Macro pivot detection: strong trend exhausting into sideways, scored by where ROC 200 sits relative to its all-time range
- Accumulation/distribution context in dashboard
- ROC 200 pivot high/low divergence markers on main chart
- Consolidation markers with conviction scoring (normal vs extreme)
- Gradient candle overlay (ROC Sticks; toggle on/off)
- Two-row dashboard: row 1 = macro context (accumulation/distribution), row 2 = current regime state with directional qualifier and slope
- Dashboard dark/light theme toggle for any chart background
- Full ROC stack in data window for manual analysis
- Webhook alerts on macro pivots (accumulation/distribution)
HOW IT WORKS
ROC alignment is the core signal. When all layers stack in the same direction, that's strong trend territory (green). When fast ROC diverges from the slower layers while slow structure still holds, the engine reclassifies from strong trend to sideways (yellow), flagging a pullback rather than trend failure. Deeper corrections where intermediate layers fall below the structural anchor fire orange, indicating a correction within the primary trend. Macro pivots fire at the inflection: strong trend exhausting into sideways for the first time. The consolidation score layers this with where ROC 200 sits in its all-time range. Consolidation at extreme ROC readings (bright green/red dots) is the highest-conviction signal for reversal.
HOW TO USE
Read the regime color, not the price. Green = strong trend long, red = strong trend short, orange = deeper correction, yellow = short pullback, white = directionless. Use regimes as a directional gate: longs during green, shorts during red. Yellow flags a pullback within trend; wait for resolution back to green/red before re-entering. Orange is a deeper correction; patience or fade with confirmation from other tools. The highest-edge signals come from regime transitions, not static states. Watch for: green breaking into yellow (macro pivot, potential reversal), extended yellow resolving back to green (continuation re-entry), and the ROC slope within a regime (slope rising in orange = trend about to resume). The data window shows the full ROC stack across all layers. When fast ROC diverges from slow, that signals continuation or reversion.
MACRO CONTEXT (Dashboard Row 1)
REGIME COLOR LEGEND (Dashboard Row 2)
ALERTS
Macro pivot long fires when accumulation is detected (bull inflection). Macro pivot short fires when distribution is detected (bear inflection). Create alert: condition = this indicator, "Any alert() function call". Paste your webhook URL, set Open-ended, create. Alert payload is built into the script; works with any webhook receiver.
CREDITS
Advance/Decline gradient function: LucF Indicator

ATR Trailing Stops for Hyperliquid Spot + Perps [HYPR-run]DESCRIPTION:
A drop-in ATR trailing exits module. Four architectures that maximize
profit on winning trades using volume weighted volatility instead of fixed levels or
plain ATR. Built modular; the trailing logic is self-contained so you
can drop it into any existing indicator or strategy as a plug-and-play
exits block. Two independent stops (long/short), spot and perps.
DISCOVERING EDGE
ATR trailing exits are popular, everyone uses them, but this indicator doesn't just trail on volatility, it trails on meaningful volatility that very few people measure. In order to gain a persistent, mechanical edge in how winners run and protect capital on the trades that don't work, we explored a more meaningful expression of ATR trailing exits.
VOLUME-WEIGHTED ATR vs PLAIN ATR
Plain ATR treats every candle equally. Volume-weighted ATR will only expand stops when volume validates the volatility, preventing premature exits on noise and letting winners run further on real moves. Over hundreds of trades this single difference can compound in the spirit of letting winners run further, losers stay controlled versus fixed levels or vanilla ATR.
- Four modes (A3.1, A4.0, A4.1, A4.2) cover different trailing
behaviors: ratcheting, chandelier anchor, free-floating, and raw
baseline. All size stop distance from volatility, not fixed levels.
- Modular engine. The trailing logic is self-contained; drop it into
any existing indicator or strategy as a plug-and-play exits block.
- Alerts fire built-in JSON webhook payloads. Paste your webhook URL,
create the alert, execute on the exchange of your choice.
ATR MODES
A3.1: LinReg + plain ATR, no ratchet. The baseline. Linear regression
projects where price is heading, plain ATR sets the distance. Stop moves
freely in both directions. Use as a reference or when you want a raw
trailing stop.
A4.0: LinReg + VWATR + Efficiency Ratio + ratchet (default). The
all-rounder. Volume-weighted ATR discounts low-liquidity candles. The
Efficiency Ratio (Kaufman) measures trend quality: in a clean trend it
widens the stop to let price run; in chop it tightens. Ratchet floor
means the stop only moves in your favor.
A4.1: Chandelier + VWATR + ratchet + first-bar multiplier. Anchored to
the highest high (longs) or lowest low (shorts). First-bar multiplier
sets a tighter initial stop, then the standard multiplier takes over as
the ratchet locks in gains. Use when entering off key levels.
A4.2: LinReg + VWATR, no ratchet. Same as A4.0 but without ratchet
floor or Efficiency Ratio. Stop moves freely with the projection, giving
the trade room through consolidation at the cost of less locked profit.
FEATURES
- Four ATR architectures selectable via dropdown
- Volume-weighted ATR: low-liquidity candles contribute less
- Efficiency Ratio: tightens in chop, widens in trend (A4.0)
- Ratchet floor: stop only moves in your favor (A4.0, A4.1)
- First-bar multiplier for tighter initial protection (A4.1)
- Separate ATR lookbacks for longs and shorts
- Separate multipliers for longs and shorts
- Two-bar confirmation prevents single-wick fakeouts
- Gradient fill between price and stop (intensifies near danger)
- Stop line color shifts with ATR regime (green stable, amber expanding)
- Ratchet circles mark each new locked-in level on the stop line
- Dashboard: mode, stop price, gap %, ER, VWATR %, regime state
- Dark/light theme toggle for any chart background
- Independent long/short alert toggles
- No JSON snippet needed; close payload is built into the script
HOW IT WORKS
Volume-weighted ATR scales each bar's true range by its volume relative
to the lookback average. High-volume bars contribute more; thin candles
contribute less. This prevents low-liquidity spikes from inflating stop
distance. Separate lookbacks for longs (default 14) and shorts (default
26) reflect that crypto drops faster than it climbs.
The Efficiency Ratio measures directional movement versus noise on a 0-1
scale. It scales the ATR multiplier between 0.8x (choppy) and 1.2x
(trending), adapting stop width to market regime. Only active in A4.0.
Two-bar confirmation requires a confirmed close beyond the stop level.
A single wick does not trigger the exit. The cross must hold for at
least one additional bar close.
ALERTS
Close Long fires as SPOT (sell spot position). Close Short fires as
PERPS (close short; spot is long-only). Toggle each independently.
Alert payload is built into the script as JSON; works with any webhook
receiver that accepts market/ticker/position fields.
CREDITS
ATR: J. Welles Wilder (1978)
Efficiency Ratio: Perry Kaufman Indicator

Multi-Timeframe EMA SMA HMA LR Proximity & Alerts [HYPR-run]DESCRIPTION:
Nine moving averages from Weekly down to chart timeframe on one chart.
Weekly 10 SMA, Daily 50/100/200 EMA/SMA, 4hr 200 SMA, plus chart-TF
10 EMA, 200 SMA, Hull MA, and Linear Regression. See where price sits
relative to every meaningful institutional level without switching
timeframes.
The proximity filter is the key feature. Enable all nine MAs, set a
threshold, and only lines near current price appear. The Daily 200 SMA
at 20% away? Hidden. When price drops toward it, the line shows up
automatically. Your chart stays clean and the levels that matter are
always visible.
DISCOVERING EDGE
We have found that managing risk in mature assets with the 50d, 100d,
200d, and 10w is highly effective, simple and a methodology shared
amongst experienced investors and traders. This indicator interprets
that positioning across 16 configurations with a 7-tier color gradient,
so you see structural health at a glance. "Oh, it's bouncing on the
50dma right now, there may be a set-up in play..."
POSITIONAL CONTEXT vs STATIC MA OVERLAY
Static overlays show every MA with no interpretation of what the
positioning means. This indicator color-codes 16 above/below
configurations weighted by MA significance (200d and 10w are
heavyweights), surfaces bounce/reject events ranked by importance,
and shows % distance to each curve so you know exactly how much of a
move is needed for price to converge.
- Events fire independently of display toggles; a hidden 200d SMA
that price just bounced off still shows "Bouncing 200d" in the
dashboard.
- 7-tier positioning gradient weighted by MA significance (200d and
10w are heavyweights) shows structural health in one glance.
- Webhook alerts on configurable MA cross (9 options from 10w to
linear regression) with full bar filter.
FEATURES
- 9 moving averages from Weekly down to chart timeframe
- Proximity filter: hides irrelevant MAs far from price
- Bounce/reject detection at each MA level
- Two alert systems: XO/XU cross + bounce/reject on selected MA
- Bounce/reject alerts fire when price wicks into selected MA (support/resistance hold)
- Dashboard: row 1 positioning context (above/below each MA), row 2 live events (bouncing, rejecting, XO, XU)
- Dashboard dark/light theme toggle for any chart background
- Polyline rendering (smooth lines, no staircase artifacts)
- End-of-line labels with % distance from price
- Toggle each MA independently
HOW IT WORKS
Higher timeframe MAs are pulled via request.security and rendered as
polylines for smooth display on any chart timeframe. The proximity check
runs on every bar: if the distance between price and a given MA exceeds
the threshold %, the polyline is not drawn. When price approaches, the
line appears. Alerts fire independently of display toggles.
DASHBOARD
Two-row dynamic dashboard that updates every bar.
- Row 1 (positioning): which MAs price is above or below, grouped with
"&" separators. The Weekly 10 SMA is separated as the anchor by a
pipe. 7-tier color gradient based on how many of the four key MAs
(50d, 100d, 200d, 10w) price is above, with heavyweight distinction
(200d and 10w carry more weight than 50d/100d): bright green (all
four), green (3/4 with both heavyweights), dark green (3/4 missing a
heavyweight), yellow (2/4), dark red (1/4 with a heavyweight), red
(1/4 only lightweight), bright red (none)
- Row 2 (events): up to 3 simultaneous events, most significant MA first
(w10 → d200 → d100 → d50 → 4h200). Bouncing (support holding),
rejecting (resistance holding), XO (crossover), XU (crossunder). Color
intensity uses a 2D significance matrix: MA weight x event type.
Brightgreen for a w10 bounce; yellow for a d200 cross; darkgreen for
idle above d50. Dark gray when idle
- Runs independently of display toggles; events fire for all MAs even if
the line is hidden by the proximity filter
DEFAULT CONFIGURATION
Weekly 10 SMA (white), Daily 50 EMA (yellow), and Daily 200 SMA (purple)
are on by default. Proximity filter on at 5%. These three levels are the
most commonly watched institutional reference points.
POSITIONING TABLE (row 1, all 16 configurations)
BADGE COLOR (header, positioning x event combination)
ALERTS
Two alert systems. XO/XU fires when price crosses the selected MA with a
full bar filter (body >= 66.6% of range, rejects doji/wick-heavy bars).
Bounce/Reject fires when price wicks into the selected MA from the correct
side and closes confirming support (bounce) or resistance (reject). Both
fire JSON payloads; works with any webhook receiver.
CREDITS
No external libraries or third-party code used. Indicator

Rolling VWAPs Proximity & Alerts [HYPR-run]DESCRIPTION:
Rolling VWAPs across six time horizons on one chart. See where
volume-weighted fair value sits at chart TF, 7D, 30D, 60D, 90D and 365D
without switching timeframes. Unlike session VWAP that resets daily, rolling
VWAP uses a fixed window that slides forward continuously, giving you
dynamic support/resistance levels that institutional traders watch.
The PROXIMITY filter is the key feature. Turn on all six periods, set a
threshold, and only RVWAPs near current price appear on chart. Far lines
hide automatically; when price approaches, they show up. This keeps charts
clean while making sure you never miss a level that matters.
DISCOVERING EDGE
We have found that the first bounce/reject of a RVWAP is the most reliable and when there is a XO/XU it is a clear sign the boundary is broken. Hence, this indicator has a contextual positioning table of where price is relative to the other lookback periods while highlighting bounces and rejects with XO/XU alert signals.
ROLLING VWAP vs SESSION/ANCHORED VWAP
Session VWAP resets daily and loses all context beyond today.
Anchored VWAP requires picking the "right" date. Rolling VWAP slides
forward continuously across 7D to 365D, showing dynamic fair value
at every institutional time horizon without manual anchoring.
- Proximity filter surfaces only the RVWAPs near current price; far
lines hide automatically and appear as price approaches.
- Events row catches bounces and rejections ranked by period
significance (365D highest); when a key MA and RVWAP sit at the
same price and both bounce, that's institutional-grade confluence.
- Webhook alerts on configurable RVWAP cross with full bar filter;
30D for frequent signals, 90D for swing-level changes, 365D for
the macro signal.
FEATURES
- Six rolling VWAP periods: Chart TF, 7D, 30D, 60D, 90D, 365D
- Proximity filter: only relevant lines appear near price
- Bounce/reject detection at each RVWAP level
- Webhook alerts on selected RVWAP cross (long/short)
- Dashboard: row 1 positioning context (above/below each RVWAP), row 2 live events (bouncing, rejecting, XO, XU)
- Polyline labels with proximity % from price
- Toggle each period independently
- Dashboard dark/light theme toggle for any chart background
HOW IT WORKS
Rolling VWAP calculates cumulative (price x volume) / cumulative volume
over a fixed lookback window. The 30D RVWAP always reflects the last 30
calendar days of volume-weighted price. When price crosses above it, the
market is trading above recent fair value; crossing below means price has
fallen below where volume concentrated. Bounces confirm support holding;
rejects confirm resistance holding.
DASHBOARD
Two-row dynamic dashboard that updates every bar.
- Row 1 (positioning): which RVWAPs price is above or below, grouped with
"&" separators. The 365D RVWAP is separated as the anchor by a pipe.
7-tier color gradient based on how many of the four key RVWAPs
(30d, 60d, 90d, 365d) price is above, with heavyweight distinction
(90d and 365d carry more weight than 30d/60d): bright green (all
four), green (3/4 with both heavyweights), dark green (3/4 missing a
heavyweight), yellow (2/4), dark red (1/4 with a heavyweight), red
(1/4 only lightweight), bright red (none)
- Row 2 (events): up to 3 simultaneous events, most significant period
first (365D → 90D → 60D → 30D → 7D). Bouncing (support holding),
rejecting (resistance holding), XO (crossover), XU (crossunder). Color
intensity maps to event significance. Dark gray when idle
- Runs independently of display toggles; events fire for all periods even
if the line is hidden by the proximity filter
ALERTS
Two alert systems. XO/XU fires when price crosses the selected RVWAP
(default: 30D). Bounce/Reject fires when price wicks into the selected
RVWAP from the correct side and closes confirming support (bounce) or
resistance (reject). Both fire JSON payloads; works with any webhook
receiver.
POSITIONING TABLE (row 1, all 16 configurations)
BADGE COLOR (header, positioning x event combination)
TIMEFRAME RECOMMENDATIONS
- 7D: best on 8hr and below
- 30D: the default, works on most timeframes
- 60D: best on 3-Day and below
- 90D: best on Weekly and below
- 365D: works on Monthly and below
CREDITS
Rolling VWAP calculation: PineCoders/ConditionalAverages library Indicator

ADXVMA Multi-TF Overlay & Alerts [HYPR-run]DESCRIPTION:
ADXVMA across three lookback periods on one chart. A moving average that
uses the ADX (Average Directional Index) as its smoothing factor; fast in
trends, flat in chop. Price crossing above or below a selected ADXVMA
fires a webhook-ready alert for automated execution.
Based on Linnsoft's ADXvma implementation, combining Chande's Variable
Moving Average (VIDYA) with Wilder's ADX as the volatility measure. When
ADX is high (strong trend), the MA tracks price closely. When ADX is low
(choppy), the MA barely moves. This makes it naturally adaptive without
manual adjustment.
DISCOVERING EDGE
Adaptive MAs are popular (KAMA, VIDYA, DEMA), but most still treat
every directional change as a trend signal, producing false signals. This indicator adds a fuzzy factor dead zone that creates a third state, "fuzzy flat" that must exceed a noise threshold
before registering a directional change. We found the fuzzy flat signal to be a powerful signal for confirming consolidation within a trend on shorter look back periods and with the longer period for identifying ranging distribution/accumulation regimes.
Fuzzy ADXVMA vs ADXVMA
The fuzzy dead zone forces a consolidation state (yellow
flat) where a pivot or trend change would present otherwise. When the MA finally turns green or
red, it exceeds the noise floor and considered a more reliable directional
commitment, not a minor fluctuation.
- Flat duration before the cross determines signal quality; XO after
15+ bars flat = base resolved (high conviction), XO after 3 bars
flat = noise (low conviction).
- 7-tier regime gradient (D Trend at score 5 down to Potential Chop
at 0) shows the trend proving itself bar by bar across multiple
lookbacks.
- Two alert systems with multi-layer filtering (not vanilla crossovers).
Regime-confirmed fires only at early pivots. Volatility-confirmed
fires only when bar participation validates the MA shift.
FEATURES
- Three lookbacks: short, long, weekly
- Fuzzy flat detection (dead zone prevents false trend changes in chop)
- Optional ATR volatility scaling (shorter period in high-vol regimes)
- Dashboard with 7-tier regime gradient and event badge
- Two alert systems with multi-layer filtering (not vanilla crossovers)
- Regime-confirmed: price vs ADXVMA, only at early pivots (score 1-2)
- Volatility-confirmed: ADXVMA momentum shift + ATR bar expansion
- Select which lookback triggers regime-confirmed alerts
- Color-coded: green (up), red (down), yellow (flat)
- Dashboard dark/light theme toggle for any chart background
HOW IT WORKS
ADX measures trend strength on a 0-1 scale and feeds it directly into
the MA smoothing factor. High ADX = MA tracks price. Low ADX = MA holds
still. The fuzzy factor adds a dead zone so tiny movements register as
flat instead of false trend changes. Three simultaneous lookbacks give
you short-term, medium-term, and weekly context without switching charts.
DASHBOARD
Regime state at a glance. The header row shows a badge that flags
conflicting events; the second row shows the current regime label with
a 7-tier color gradient; the third row shows direction pivot events.
ALERTS
Two independent alert systems, both multi-layer filtered. Regime-confirmed:
the regime pivot is the signal; price crossing the selected ADXVMA is just
the trigger. Only fires at early pivots (score 1-2), ignoring mid-trend
crosses entirely. Volatility-confirmed: the ATR bar expansion is the
signal; the ADXVMA momentum shift is the trigger. Only fires when the bar
shows real participation (high/low extends beyond open +/- ATR), ignoring
low-range bars. Both fire JSON payloads; works with any webhook receiver.
CREDITS
ADXVMA: Linnsoft
ADX: J. Welles Wilder (1978)
VIDYA: Tushar S. Chande, TASC March 1992 Indicator

Indicator

Library

WebhookGeneratorLibrary "WebhookGenerator"
Generates Json objects for webhook messages.
GenerateOT(license_id, symbol, action, order_type, trade_type, size, price, tp, sl, risk, trailPrice, trailOffset)
CreateOrderTicket: Establishes a order ticket.
Parameters:
license_id (string) : Provide your license index
symbol (string) : Symbol on which to execute the trade
action (string) : Execution method of the trade : "MRKT" or "PENDING"
order_type (string) : Direction type of the order: "BUY" or "SELL"
trade_type (string) : Is it a "SPREAD" trade or a "SINGLE" symbol execution?
size (float) : Size of the trade, in units
price (float) : If the order is pending you must specify the execution price
tp (float) : (Optional) Take profit of the order
sl (float) : (Optional) Stop loss of the order
risk (float) : Percent to risk for the trade, if size not specified
trailPrice (float) : (Optional) Price at which trailing stop is starting
trailOffset (float) : (Optional) Amount to trail by
Returns: Return Order string Library

DiscordWebhooksLibrary🚀 Introduction
Welcome to the PulseWire PineScript Library for Discord Webhook Integration! This library is designed for traders and developers who use PulseWire for technical analysis and want to integrate their trading strategies with Discord notifications.
Key Features:
* Embed Creation: Easily create rich and informative embeds for your Discord messages, allowing you to send detailed trading alerts and summaries.
* Flexible Webhook Formatting: Customize your Discord messages with options for usernames, avatars, and text content, providing a personalized touch to your notifications.
* Simple Integration: Designed with simplicity in mind, this library can be integrated into your existing Pine Script trading strategies without extensive coding knowledge.
* Real-time Alerts: Utilize PulseWire's alert system to send real-time trade signals and market updates to your Discord server.
Compatibility:
This library is compatible with PulseWire's Pine Script version 5.
🍃 Code Snippets and Usage Examples
The following examples demonstrate how to use the Discord Webhook Integration Library in your PulseWire Pine Scripts. These snippets cover various scenarios, showcasing the flexibility and utility of the library.
Example 1: Simple Alert with Markdown in Embed Description
embedDesc = "This is a **bold** and _italic_ alert message with a (replace_with_your_link)"
embedJson = createEmbedJSON("Simple Alert", embedDesc, 12345)
content = discordWebhookJSON("Alert from Captain Hook", "Captain Hook", na, embedJson)
Example 2: Multiple Embeds with Different Markdown Styles
embedDesc1 = "First alert with **bold** text"
embedDesc2 = "Second alert with _italic_ text"
embedDesc3 = "Third alert with ~~strikethrough~~"
embedJson1 = createEmbedJSON("Alert 1", embedDesc1, 654321)
embedJson2 = createEmbedJSON("Alert 2", embedDesc2, 123456)
embedJson3 = createEmbedJSON("Alert 3", embedDesc3, 111111)
embeds = embedJson1 + "," + embedJson2 + "," + embedJson3
content = discordWebhookJSON("Multiple Alerts", "Captain Hook", na, embeds)
Example 3: Complex Alert with Full Markdown Usage in Embed
embedDesc = "Alert: **Price Breakout!** " +
"*Symbol*: " + syminfo.ticker + " " +
"*Price*: $" + str.tostring(close) + " " +
" (replace_with_your_link)"
embedJson = createEmbedJSON("Complex Alert", embedDesc, 16711680) // Red color
content = discordWebhookJSON("Complex Alert", "Captain Hook", na, embedJson)
Example 4: Advanced Technical Analysis Alert
rsiValue = ta.rsi(close, 14)
= ta.macd(close, 12, 26, 9)
taMessage = "RSI: " + str.tostring(rsiValue) + " MACD: " + str.tostring(macdLine)
embedJson = createEmbedJSON("Technical Analysis Update", taMessage, 255) // Blue color
content = discordWebhookJSON("TA Alert", "Captain Hook", na, embedJson)
Example 5: Market Summary with Multiple Fields
counterTrend = "Your counter trend criterias"
counterTrendEmbed = createEmbedJSON(title = "Counter Trend", description = counterTrend, color = 15258703)
redFlags = "Your red flag criterias"
redFlagsEmbed = createEmbedJSON(title = "Red Flags", description = redFlags, color = 15229263)
embeds = counterTrendEmbed + "," + redFlagsEmbed
content = discordWebhookJSON(contentText = "Example of how a market analysis could look like", username = "Captain Hook", embeds = embeds)
🚨 Error Handling
Use Escape Characters Correctly: In message strings, remember to use for new lines instead of . This ensures that the newline character is correctly interpreted in the JSON format.
It can be helpful to plot the json on the last candle
if barstate.islast
label.new(bar_index, high, text=debugMessage, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
🔥 FAQs
Q1: Can I send alerts for multiple conditions?
A: Yes, you can configure multiple conditions in your script. Use separate if statements for each condition and call the discordWebhookJSON function with the relevant message for each alert.
Q2: Why is my alert not triggering?
A: Ensure your alert conditions are correct and that you've properly set up the webhook in both your script and PulseWire's alert configuration. Also, check for any syntax errors in your script.
Q3: How many alerts can I send to Discord?
A: While PulseWire doesn't limit the number of alerts, Discord has rate limits for webhooks. Be mindful of these limits to avoid your webhook being temporarily blocked.
Q4: Can I customize the appearance of my Discord messages?
A: Yes, the createEmbedJSON function allows you to customize your messages with titles, descriptions, colors, and more. Experiment with different parameters to achieve the desired appearance.
Q5: Is it possible to include real-time data in alerts?
A: Yes, your script can include real-time price data, indicator values, or any other real-time data available in Pine Script.
Q6: How can I contribute to the library or suggest improvements?
A: You can provide feedback, suggest improvements, or contribute to the library's development through the community channels or contact points provided in the "Support and Community" section.
formatTimeframe()
discordWebhookJSON(contentText, username, avatar_url, embeds)
Constructs a JSON string for a Discord webhook message. This string includes optional fields for content, username, avatar URL, and embeds.
Parameters:
contentText (string) : (string, optional): The main text content of the webhook message. Default is 'na'.
username (string) : (string, optional): Overrides the default username of the webhook. Default is 'na'.
avatar_url (string) : (string, optional): Overrides the default avatar URL of the webhook. Default is 'na'.
embeds (string) : (string, optional): A string containing one or more embed JSON objects. This should be formatted correctly as a JSON array. Default is 'na'.
createEmbedJSON(title, description, color, authorName, authorUrl, authorIconUrl, fields)
Creates a JSON string for a single embed object for a Discord webhook.
Parameters:
title (string) : (string, optional): The title of the embed. Default is 'na' (not applicable).
description (string) : (string, optional): The description text of the embed. Supports basic formatting. Default is 'na'.
color (int) : (int, optional): The color code of the embed, typically in decimal format. Default is 'na'.
authorName (string) : (string, optional): The name of the author to display in the embed. Default is 'na'.
authorUrl (string) : (string, optional): The URL linked to the author's name. Default is 'na'.
authorIconUrl (string) : (string, optional): The URL of the icon to display next to the author's name. Default is 'na'.
fields (string) : (string, optional): A string containing one or more field JSON objects. This should be formatted correctly as a JSON array. Default is 'na'. Note: Use the 'createEmbedFieldJSON' function to generate these JSON field strings before adding them to the array.
createEmbedFieldJSON(name, value, inline)
Creates a JSON string representing a single field object within an embed for a Discord webhook message.
Parameters:
name (string) : (string): The name of the field, acting as a title for the field content.
value (string) : (string): The value of the field, containing the actual text or information you want to display within the field.
inline (bool) : (bool, optional): A boolean flag indicating whether the field should be displayed inline with other fields. If set to true, the field will be displayed on the same line as the next field
❤️ Please, support the work with like & comment! ❤️ Library

Antares_messages_publicLibrary "Antares_messages_public"
This library add messages for yours strategy for use in Antares trading system for binance and bybit exchanges.
Данная библиотека позволяет формировать сообщения в алертах стратегий для Antares в более упрощенном для пользователя режиме, включая всплывающие подсказки и т.д.
set_leverage(token, market, ticker_id, leverage)
Set leverage for ticker on specified market.
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
leverage (float) : (float) leverage level. Устанавливаемое плечо.
Returns: 'Set leverage message'.
pause(time_pause)
Set pause in message. '::' -left and '::' -right included.
Parameters:
time_pause (int)
LongLimit(token, market, ticker_id, type_qty, quantity, price, orderId, leverageforqty)
Buy order with limit price and quantity.
Лимитный ордер на покупку(в лонг).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
price (float) : (float) price for limit order. Цена по которой должен быть установлен лимитный ордер.
orderId (string) : (string) if use order id you may change or cancel your order after or set it ''. Используйте OrderId если хотите изменить или отменить ордер в будущем.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Limit Buy order'. Лимитный ордер на покупку (лонг).
LongMarket(token, market, ticker_id, type_qty, quantity, leverageforqty)
Market Buy order with quantity.
Рыночный ордер на покупку (в лонг).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
leverageforqty (int) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Market Buy order'. Маркетный ордер на покупку (лонг).
ShortLimit(token, market, ticker_id, type_qty, quantity, price, leverageforqty, orderId)
Sell order with limit price and quantity.
Лимитный ордер на продажу(в шорт).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
price (float) : (float) price for limit order. Цена по которой должен быть установлен лимитный ордер.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
orderId (string) : (string) if use order id you may change or cancel your order after or set it ''. Используйте OrderId если хотите изменить или отменить ордер в будущем.
Returns: 'Limit Sell order'. Лимитный ордер на продажу (шорт).
ShortMarket(token, market, ticker_id, type_qty, quantity, leverageforqty)
Sell by market price and quantity.
Рыночный ордер на продажу(в шорт).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
leverageforqty (int) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Market Sell order'. Маркетный ордер на продажу (шорт).
Cancel_by_ticker(token, market, ticker_id)
Cancel all orders for market and ticker in setups. Отменяет все ордера на заданной бирже и заданном токене(паре).
Parameters:
token (string)
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
Returns: 'Cancel all orders'. Отмена всех ордеров на заданной бирже и заданном токене(паре).
Cancel_by_id(token, market, ticker_id, orderId)
Cancel order by Id for market and ticker in setups. Отменяет ордер по Id на заданной бирже и заданном токене(паре).
Parameters:
token (string)
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
orderId (string)
Returns: 'Cancel order'. Отмена ордера по Id на заданной бирже и заданном токене(паре).
Close_positions(token, market, ticker_id)
Close all positions for market and ticker in setups. Закрывает все позиции на заданной бирже и заданном токене(паре).
Parameters:
token (string)
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
Returns: 'Close positions'
CloseLongLimit(token, market, ticker_id, type_qty, quantity, price, orderId, leverageforqty)
Close limit order for long position. (futures)
Лимитный ордер на продажу(в шорт) для закрытия лонговой позиции(reduceonly).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
price (float) : (float) price for limit order. Цена по которой должен быть установлен лимитный ордер.
orderId (string) : (string) if use order id you may change or cancel your order after or set it ''. Используйте OrderId если хотите изменить или отменить ордер в будущем.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Limit Sell order reduce only (close long position)'. Лимитный ордер на продажу для снижения текущего лонга(в шорт не входит).
CloseLongMarket(token, market, ticker_id, type_qty, quantity, leverageforqty)
Close market order for long position.
Рыночный ордер на продажу(в шорт) для закрытия лонговой позиции(reduceonly).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Market Sell order reduce only (close long position)'. Ордер на снижение/закрытие текущего лонга(в шорт не входит) по рыночной цене.
CloseShortLimit(token, market, ticker_id, type_qty, quantity, price, orderId, leverageforqty)
Close limit order for short position.
Лимитный ордер на покупку(в лонг) для закрытия шортовой позиции(reduceonly).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
price (float) : (float) price for limit order. Цена по которой должен быть установлен лимитный ордер.
orderId (string) : (string) if use order id you may change or cancel your order after or set it ''. Используйте OrderId если хотите изменить или отменить ордер в будущем.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Limit Buy order reduce only (close short position)' . Лимитный ордер на покупку (лонг) для сокращения/закрытия текущего шорта.
CloseShortMarket(token, market, ticker_id, type_qty, quantity, leverageforqty)
Set Close limit order for long position.
Рыночный ордер на покупку(в лонг) для сокращения/закрытия шортовой позиции(reduceonly).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Market Buy order reduce only (close short position)'. Маркетного ордера на покупку (лонг) для сокращения/закрытия текущего шорта.
cancel_all_close(token, market, ticker_id)
Parameters:
token (string)
market (string)
ticker_id (string)
limit_tpsl_bybitfu(token, ticker_id, order_id, side, type_qty, quantity, price, tp_price, sl_price, leverageforqty)
Set multi order for Bybit : limit + takeprofit + stoploss
Выставление тройного ордера на Bybit лимитка со стоплоссом и тейкпрофитом
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
order_id (string)
side (bool) : (bool) "buy side" if true or "sell side" if false. true для лонга, false для шорта.
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
price (float) : (float) price for limit order by 'side'. Цена лимитного ордера
tp_price (float) : (float) price for take profit order.
sl_price (float) : (float) price for stoploss order
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: Set multi order for Bybit : limit + takeprofit + stoploss.
replace_limit_tpsl_bybitfu(token, ticker_id, order_id, side, type_qty, quantity, price, tp_price, sl_price, leverageforqty)
Change multi order for Bybit : limit + takeprofit + stoploss
Изменение тройного ордера на Bybit лимитка со стоплоссом и тейкпрофитом
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
order_id (string)
side (bool) : (bool) "buy side" if true or "sell side" if false. true для лонга, false для шорта.
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size, see at 'type_qty'. Размер ордера, базы или % в соответствии с 'type_qty'
price (float) : (float) price for limit order by 'side'. Цена лимитного ордера
tp_price (float) : (float) price for take profit order.
sl_price (float) : (float) price for stoploss order
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: Set multi order for Bybit : limit + takeprofit + stoploss.
long_stop(token, market, ticker_id, type_qty, quantity, l_stop, leverageforqty)
Stop market order for long position
Рыночный стоп-ордер на продажу для закрытия лонговой позиции.
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size. Размер ордера.
l_stop (float) : (float) price for activation stop order. Цена активации стоп-ордера.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Stop Market Sell order (close long position)'. Маркетный стоп-ордер на снижения/закрытия текущего лонга.
short_stop(token, market, ticker_id, type_qty, quantity, s_stop, leverageforqty)
Stop market order for short position
Рыночный стоп-ордер на покупку(в лонг) для закрытия шорт позиции.
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size. Размер ордера.
s_stop (float) : (float) price for activation stop order. Цена активации стоп-ордера.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Stop Market Buy order (close short position)'. Маркетный стоп-ордер на снижения/закрытия текущего шорта.
change_stop_l(token, market, ticker_id, type_qty, quantity, l_stop, leverageforqty)
Change Stop market order for long position
Изменяем стоп-ордер на продажу(в шорт) для закрытия лонг позиции.
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size. Размер ордера.
l_stop (float) : (float) price for activation stop order. Цена активации стоп-ордера.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Change Stop Market Buy order (close long position)'. Смещает цену активации Маркетного стоп-ордер на снижения/закрытия текущего лонга.
change_stop_s(token, market, ticker_id, type_qty, quantity, s_stop, leverageforqty)
Change Stop market order for short position
Смещает цену активации Рыночного стоп-ордера на покупку(в лонг) для закрытия шорт позиции.
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string)
quantity (float) : (float) orders size. Размер ордера.
s_stop (float) : (float) price for activation stop order. Цена активации стоп-ордера.
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Change Stop Market Buy order (close short position)'. Смещает цену активации Маркетного стоп-ордер на снижения/закрытия текущего шорта.
open_long_position(token, market, ticker_id, type_qty, quantity, l_stop, leverageforqty)
Cancel and close all orders and positions by ticker , then open Long position by market price with stop order
Отменяет все лимитки и закрывает все позы по тикеру, затем открывает лонг по маркету с выставлением стопа (переворот позиции, при необходимости).
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size. Размер ордера.
l_stop (float) : (float). Price for activation stop loss. Цена активации стоп-лосса.
leverageforqty (int) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'command_all_close + LongMarket + long_stop.
open_short_position(token, market, ticker_id, type_qty, quantity, s_stop, leverageforqty)
Cancel and close all orders and positions , then open Short position by market price with stop order
Отменяет все лимитки и закрывает все позы по тикеру, затем открывает шорт по маркету с выставлением стопа(переворот позиции, при необходимости).
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) orders size. Размер ордера.
s_stop (float) : (float). Price for activation stop loss. Цена активации стоп-лосса.
leverageforqty (int) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'command_all_close + ShortMarket + short_stop'.
open_long_trade(token, market, ticker_id, type_qty, quantity, l_stop, qty_ex1, price_ex1, qty_ex2, price_ex2, qty_ex3, price_ex3, leverageforqty)
Cancell and close all orders and positions , then open Long position by market price with stop order and take 1 ,take 2, take 3
Отменяет все лимитки и закрывает все позы по тикеру, затем открывает лонг по маркету с выставлением стопа и 3 тейками (переворот позиции, при необходимости).
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
quantity (float) : (float) enter order size, see at type_qty. Размер ордера входа, согласно type_qty.
l_stop (float) : (float). Price for activation stop loss. Цена активации стоп-лосса.
qty_ex1 (float) : (float). Quantity for 1th take see at type_qty, if = 0 string for order dont set. Размер лимитного ордера для 1го тейка, согласно type_qty.. Если 0, то строка для этого тейка не формируется
price_ex1 (float) : (float). Price for 1th take , if = 0 string for order dont set. Цена лимитного ордера для 1го тейка. Если 0, то строка для этого тейка не формируется
qty_ex2 (float) : (float). Quantity for 2th take see at type_qty, if = 0 string for order dont set. Размер лимитного ордера для 2го тейка, согласно type_qty..Если 0, то строка для этого тейка не формируется
price_ex2 (float) : (float). Price for 2th take, if = 0 string for order dont set. Цена лимитного ордера для 2го тейка. Если 0, то строка для этого тейка не формируется
qty_ex3 (float) : (float). Quantity for 3th take see at type_qty, if = 0 string for order dont set. Размер лимитного ордера для 2го тейка, согласно type_qty..Если 0, то строка для этого тейка не формируется
price_ex3 (float) : (float). Price for 3th take, if = 0 string for order dont set. Цена лимитного ордера для 3го тейка. Если 0, то строка для этого тейка не формируется
leverageforqty (int)
Returns: 'cancel_all_close + LongMarket + long_stop + CloseLongLimit1 + CloseLongLimit2+CloseLongLimit3'.
open_short_trade(token, market, ticker_id, type_qty, quantity, s_stop, qty_ex1, price_ex1, qty_ex2, price_ex2, qty_ex3, price_ex3, leverageforqty)
Cancell and close all orders and positions , then open Short position by market price with stop order and take 1 and take 2
Отменяет все лимитки и закрывает все позы по тикеру, затем открывает шорт по маркету с выставлением стопа и 3 тейками (переворот позиции, при необходимости).
Parameters:
token (string)
market (string) : (string) 'binance' , 'binancefru' etc.. Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string)
quantity (float)
s_stop (float) : (float). Price for activation stop loss. Цена активации стоп-лосса.
qty_ex1 (float) : (float). Quantity for 1th take see at type_qty, if = 0 string for order dont set. Размер лимитного ордера для 1го тейка, согласно type_qty.. Если 0, то строка для этого тейка не формируется
price_ex1 (float) : (float). Price for 1th take , if = 0 string for order dont set. Цена лимитного ордера для 1го тейка. Если 0, то строка для этого тейка не формируется
qty_ex2 (float) : (float). Quantity for 2th take see at type_qty, if = 0 string for order dont set. Размер лимитного ордера для 2го тейка, согласно type_qty..Если 0, то строка для этого тейка не формируется
price_ex2 (float) : (float). Price for 2th take, if = 0 string for order dont set. Цена лимитного ордера для 2го тейка. Если 0, то строка для этого тейка не формируется
qty_ex3 (float) : (float). Quantity for 3th take see at type_qty, if = 0 string for order dont set. Размер лимитного ордера для 2го тейка, согласно type_qty..Если 0, то строка для этого тейка не формируется
price_ex3 (float) : (float). Price for 3th take, if = 0 string for order dont set. Цена лимитного ордера для 3го тейка. Если 0, то строка для этого тейка не формируется
leverageforqty (int)
Returns: 'command_all_close + ShortMarket + short_stop + CloseShortLimit + CloseShortLimit(2)'.
Multi_LongLimit(token, market, ticker_id, type_qty, qty1, price1, qty2, price2, qty3, price3, qty4, price4, qty5, price5, qty6, price6, qty7, price7, qty8, price8, leverageforqty)
8 or less Buy orders with limit price and quantity.
До 8 Лимитных ордеров на покупку(в лонг).
Parameters:
token (string) : (integer or 0) token for trade in system, if = 0 then token part mess is empty. Токен, При значениb = 0 не включается в формирование строки алерта.
market (string) : (string) Spot 'binance' , 'bybit' . Futures ('binancefru','binancefro','bybitfu', 'bybitfi'). Строковая переменная названия биржи.
ticker_id (string) : (string) ticker in market ('btcusdt', 'ethusdt' etc...). Строковая переменная названия тикера (пары).
type_qty (string) : (string) type of quantity: 1. 'qty' or '' or na - standart (in coins), 2. 'quqty'- in assets (usdt,btc,etc..), 3.open% - open position(futures) or buy (spot) in % of base 4. close% - close in % of position (futures) or sell (spot) coins in % for current quantity
qty1 (float)
price1 (float)
qty2 (float)
price2 (float)
qty3 (float)
price3 (float)
qty4 (float)
price4 (float)
qty5 (float)
price5 (float)
qty6 (float)
price6 (float)
qty7 (float)
price7 (float)
qty8 (float)
price8 (float)
leverageforqty (bool) : (bool) use leverage in qty. Использовать плечо при расчете количества или нет.
Returns: 'Limit Buy order'. Лимитный ордер на покупку (лонг). Library

Indicator

Indicator
