AUTOMATED TRADING

Use conditional orders to buy or sell

Simply define your target price with specific triggers.
							local orderTable = InputTable(
    InputTableOptions('Orders'),
    InputTableColumn('ID', 'buy', 'sl', 'sell'),
    InputTableColumn('Market Order', false, true, false),
    InputTableColumn('Direction', '+', '-', '-'),
    InputTableColumn('Target Price', 62000, 61800, 63000),
    InputTableColumn('Amount', 0.002, 0.002, 0.002),
    InputTableColumn('Before *', '', 'sell', ''),
    InputTableColumn('After *', '', 'buy', 'buy'),
    InputTableColumn('Trigger Type *', '', '<', ''),
    InputTableColumn('Trigger Price *', '', 61800, '')
)

local isDebug = Input('Debug Mode', false)

function debuglog(msg, color)
    if not isDebug then return end
    Log('[DEBUG] ' .. msg, color or '')
end

EnableHighSpeedUpdates(true)
HideOrderSettings()
HideTradeAmountSettings()



-- ===============================================================
-- Config object

    local Config = {}

    function Config:isSpot()
        return MarketType() == SpotTrading
    end





-- ===============================================================
-- Enums

    local TableItem =
    {
        Id              = 1,
        IsMarket        = 2,
        Direction       = 3,
        TargetPrice     = 4,
        Amount          = 5,
        Before          = 6,
        After           = 7,
        TriggerType     = 8,
        TriggerPrice    = 9
    }

    local TriggerType =
    {
        LowerThan       = '<',
        HigherThan      = '>',
        Normal          = ''
    }

    local OrderDirection =								
						
+2.4%
+1.2%
-0.6%
Unlock the full power of HaasOnline
Start a free trial and enjoy 7-days free. We'll help you make better trades using Order Bot.
Start free 7-day trial
Jun 06, 23, 21:54:28 Bot deactivated
Jun 06, 23, 21:54:28 Backtest start date: 06/06/23 21:54:28 GTM+0
Jun 06, 23, 21:54:28 Backtest end date: 06/06/23 21:54:28 GTM+0
Jun 06, 23, 21:54:28 Backtest took: 00:00:01.6642358ms
Jun 06, 23, 21:54:28 ----- Custom Report -----
Jun 06, 23, 21:54:28 Estimated Profit: 0.01 BTC
Jun 06, 23, 21:54:28 ----- Backtest report BINANCE_BNB_BTC_ -----
Jun 06, 23, 21:54:28 Gross profits: 100.00000000 BNB
Jun 06, 23, 21:54:28 Fee costs: 10.00000000 BNB
Jun 06, 23, 21:54:28 Realized profits: 90.00000000 BNB
Jun 06, 23, 21:54:28 Return on investment: 10.0000 %
Jun 06, 23, 21:54:28 Price change: 0.0306%
Jun 06, 23, 21:54:28 Closed positions: 100x
Jun 06, 23, 21:54:28 Profitable positions: 60x (90.00%)
Jun 06, 23, 21:54:28 Losing positions: 40x (10.00%)
Jun 06, 23, 21:54:28 Average margin: 5.00000000 BNB
Jun 06, 23, 21:54:28 Average realized profits: 10.00000000 BNB
Jun 06, 23, 21:54:28 Executed orders: 100x
Jun 06, 23, 21:54:28 Completed order: 100x
Jun 06, 23, 21:54:28 Average open time: 10 seconds
Jun 06, 23, 21:54:28 ----- Performance report BINANCE_BNB_BTC_ -----
Jun 06, 23, 21:54:28 Max. DrawDown: 1.00% / 40.00000000 BNB
Jun 06, 23, 21:54:28 Sharpe Ratio: 1.00
Jun 06, 23, 21:54:28 Sortino Ratio: 1.00
Jun 06, 23, 21:54:28 Win %: 3.00 %
Jun 06, 23, 21:54:28 Profit Ratio: 3.00
Jun 06, 23, 21:54:28 Profit Factor: 3.00
Jun 06, 23, 21:54:28 CPC Index: 1.00
Jun 06, 23, 21:54:28 Tail Ratio: 2.00
Jun 06, 23, 21:54:28 Common Sense Ratio: 2.00
Jun 06, 23, 21:54:28 Outlier Win Ratio: 3.00
Jun 06, 23, 21:54:28 Outlier Loss Ratio: 1.00
Jun 06, 23, 21:54:28 Profit Margin Ratio: 54.00
Jun 06, 23, 21:54:28 Biggest Win: 100.00000000
Jun 06, 23, 21:54:28 Biggest Loss: -100.00000000
Jun 06, 23, 21:54:28 Highest Point in PNL: 5.00000000
Jun 06, 23, 21:54:28 Lowest Point in PNL: -5.00000000

*These numbers are for illustration only and do not reflect past or future performance.

The conditional order trading strategy is an advanced approach that allows you to set predefined conditions for your trades. When these conditions are met, your trading bot executes the orders automatically. Using HaasScript on TradeServer Cloud, you can create custom trading bots that utilize conditional orders to take advantage of the ever-changing crypto market.

One key benefit of using conditional orders is the ability to manage your risk more effectively. By setting stop-loss and take-profit levels, you can ensure that your trades are executed at the most optimal price points, protecting your investments and locking in profits. This means you can trade with confidence, knowing that your strategy will adapt to the market's movements.

Another advantage of conditional order trading is the opportunity to capitalize on market events and trends. With HaasScript and TradeServer Cloud, you can create complex conditions based on technical indicators and other data points, allowing your trading bot to react swiftly to market changes. This gives you an edge over manual trading, as your bot can make decisions and execute trades faster than you could on your own.

In summary, the conditional order trading strategy, combined with HaasScript and TradeServer Cloud, provides you with an advanced, flexible, and effective way to trade in the dynamic world of cryptocurrencies. You'll be able to manage risk, seize opportunities, and stay ahead of the competition with ease.

More Alpha. Less Noise.

See if these exclusive offers can help your trading strategies, claim these rewards while they last!

Promotions offered by third-parties and are subject to availability, terms, and conditions. Other restrictions may apply. Individual results may vary and are not typical.

Discover alternatives to the Order Bot

Pro Upgrade1. Completely Free2. Unrestricted Trial3.

Try TradeServer Cloud for 7-days and discover opportunities you've been missing.
Start free 7-day trial ›
1 TradeServer Cloud Pro upgrade is a 7-day trial of a premium subscription. Automatically downgraded to Lite on expiration or non-payment.
2 During the 7-day TradeServer Cloud Pro trial you will not be required to pay to access Pro plan features.
3 Access to premium features within TradeServer Cloud does not include third-party restrictions or unforeseen issues.