BRINOVS blocks: Sell conditions and market selection (34 to 37)

Plain-words guide to the BRINOVS blocks for selling early (early exit, exit all) and choosing markets (market switcher, allowlist, barrier switcher).

This part has two small folders of BRINOVS blocks. The first, "Sell conditions", is about closing a contract before it ends. The second, "Market selection", is about which market (symbol) the bot trades and which markets it is allowed to use.

A few words first. A contract is one trade you buy. It settles when it ends and the result is known. To sell a contract means to close it early at the market price, which is the price the market offers at that moment, not a price you choose. A round is one finished trade (a hedge, which buys two opposite contracts together, counts as one round). A market or symbol is the thing you trade, for example the Volatility 100 Index, written R_100. The journal is the log panel of the Bot Builder, where the bot writes what it is doing.

Important about selling early: many contract types cannot be sold before they end. Digit contracts are an example. Deriv decides, and these blocks always ask Deriv first. When a contract cannot be sold, the bot leaves it to settle by itself and says so in the journal.

You find these blocks in the BRINOVS menu, in the folders "Sell conditions" and "Market selection". The sell blocks work while a contract is open, in "3. Sell conditions". The market blocks run between trades or before a purchase. Nothing here makes a win more likely.

Early exit

  • Kind: BRINOVS custom, block #34
  • Type id: bnv_early_exit
  • Shape: Action block
  • Where it goes: Only inside "3. Sell conditions". Outside it, the block is greyed out (disabled).
  • What it does: Watches your open contract and asks to sell it at the market price when its profit reaches a target, when its loss reaches a limit, or when a number of ticks have passed since the purchase. You can use any one of these or all three.
  • Inputs:
    • sell when the profit reaches: a number of 0 or more, default 2 (0 = not used)
    • or the loss reaches: a number of 0 or more, default 1 (0 = not used)
    • or [ 0 ] ticks have passed since the purchase: a whole number of 0 or more, default 0 (0 = not used)
    • the condition must hold [ 1 ] ticks in a row: a whole number from 1 to 1000, default 1
    • look at: [ each contract ▾ ] (default) or [ the whole batch together ▾ ]
  • How it works: On every check the block works out the profit of the contract. "Must hold K ticks" means the condition has to be true at K different ticks in a row, and the count starts again if it stops being true. With "the whole batch together" it adds the profit of all contracts bought together (a hedge), settled ones included, and sells the open ones. It sells only when Deriv says the contract can be sold. A sell is never sent twice at once, and it is tried at most 3 times, 3 seconds apart. Ticks are counted by this run, so a contract that was already open when the bot started may be counted short.
  • Example:
┌─ 3. Sell conditions ────────────────────────────┐
│ Early exit: sell when the profit reaches [ 3 ]  │
│   or the loss reaches [ 2 ]                     │
│   or [ 0 ] ticks have passed since the purchase │
│   the condition must hold [ 2 ] ticks in a row  │
│   look at [ each contract ▾ ]                   │
└─────────────────────────────────────────────────┘

When the profit of the contract stays at 3 or more for two ticks in a row, the bot asks Deriv to sell it at the market price. The same happens if the loss stays at 2 or more.

  • Good to know:
    • Refusals (the bot stops with a message): a target or maximum loss that is empty or below 0; "after N ticks" that is not a whole number of 0 or more; "must hold" that is not a whole number from 1 to 1000; no scope chosen; all three conditions at 0 ("set at least one condition"); the BRINOVS execution layer is off.
    • The sale is at the market price at that moment. A maximum loss here is NOT a guaranteed price, and the real loss can be bigger than the number you wrote.
    • If the contract cannot be sold, the journal says so once and the contract settles by itself. After 3 failed tries the bot gives up on that contract and says so.
    • The profit and loss numbers are in the money of your account.

Exit all contracts

  • Kind: BRINOVS custom, block #35
  • Type id: bnv_exit_all
  • Shape: Action block
  • Where it goes: Anywhere an action block fits, in the middle of a stack. It is not limited to one root block.
  • What it does: The panic button. It asks to sell every open contract at the market price, one by one, and writes in the journal how many were sold and which ones could not be. On the block it reads "Exit all open contracts (sell at market)".
  • Inputs: None. The block has no fields.
  • How it works: For each open contract the bot first checks that Deriv says it can be sold. Contracts that cannot be sold (many types, digits for example) are left to settle by themselves, and the journal gives the reason for each. A contract is never sold twice. The price you get is the market price at that moment, not a price you choose.
  • Example:
┌─ 3. Sell conditions ───────────────────────────┐
│ if  < Sell is available >                      │
│ then  Exit all open contracts (sell at market) │
└────────────────────────────────────────────────┘

When the contract can be sold, the bot sells all its open contracts it is allowed to sell. The journal then says, for example, "sold 1 of 1 open contract".

  • Good to know:
    • Refusal: the bot stops if the BRINOVS execution layer is off.
    • If there are no open contracts, the journal says there is nothing to sell. If Deriv does not answer, the journal says nothing was assumed and tells you to check your open contracts in Deriv.
    • If Deriv asks the bot to slow down, press the button again in a moment. If an answer is lost, check that contract in Deriv before doing anything else.
    • It does not undo losses. It only closes contracts at the market price.

Market switcher

  • Kind: BRINOVS custom, block #36
  • Type id: bnv_market_switcher
  • Shape: Action block
  • Where it goes: Only inside "4. Restart trading conditions", before Trade again.
  • What it does: Changes the market the bot trades, between trades, and only to a market from your own list. It can rotate through the list, move on after losses, or pick the market with the best score. With switching OFF it is a one-time picker.
  • Inputs:
    • switching: [ ON (switch between my markets) ▾ ] (default) or [ OFF (pick one market, once) ▾ ]. With OFF only the Market, Submarket and Symbol lists of "1. Trade parameters" show.
    • my markets: names separated by commas, 2 to 30 different ones (the default is R_10, R_25, R_50, R_75, R_100 and the 1HZ markets); mode: [ rotate every N rounds ▾ ] (default), [ switch after N losing rounds in a row ▾ ] or [ pick the best score every N rounds ▾ ]; N: a whole number from 1 to 1000, default 5
    • best score means: [ highest volatility ▾ ] (default), [ lowest volatility ▾ ], [ highest custom number ▾ ] or [ not picked recently ▾ ]; custom numbers: one per market, same order (only for "highest custom number")
    • do not re-pick the last [ 1 ] markets (0 up to the list size minus 2); at most [ 6 ] switches per hour (1 to 3600)
  • How it works: The block counts finished rounds (pretend rounds on their own counter). When the count reaches N, and no contract is open, it picks the next market. It skips any market that does not offer the contract types of your bot right now (Over, Under or both), any of the last markets it used, and any market outside your list. After a switch it waits for the first fresh price of the new market. Volatility here is the average size of a price move, as a share of the price, over the latest 100 ticks of each market.
  • Example:
┌─ 4. Restart trading conditions ─────────────────────┐
│ Market switcher: switching                          │
│   [ ON (switch between my markets) ▾ ]              │
│   my markets [ R_10, R_25, R_50, R_75, R_100 ]      │
│   mode [ rotate every N rounds ▾ ]                  │
│   N [ 5 ]                                           │
│   best score means [ highest volatility ▾ ]         │
│   custom numbers (one per market, same order) [   ] │
│   do not re-pick the last [ 1 ] markets             │
│   at most [ 6 ] switches per hour                   │
└─────────────────────────────────────────────────────┘

After every 5 finished rounds, when no contract is open, the bot moves to the next market in the list and waits for its first price. (The real default list is longer.)

  • Good to know:
    • Refusals: a name that is not letters, digits and _; fewer than 2 or more than 30 different markets; a missing mode or score; any number outside its range; custom numbers that do not match the markets; no price within 20 seconds after a switch; with switching OFF, no market chosen or one that cannot be used.
    • If no market in your list can be used, or the hourly limit is reached, the bot stays on the current market and the journal says why. A market written twice is used once. It comes preloaded on a fresh Bot Builder, switched off (disabled): enable it and write your own list. Switching markets does not make a win more likely.

Market allowlist

  • Kind: BRINOVS custom, block #37
  • Type id: bnv_market_allowlist
  • Shape: True/false block
  • Where it goes: In an if inside "2. Purchase conditions", above Purchase.
  • What it does: Says yes only when the market the bot trades, and the contract it is about to buy, are on your list. It only answers. It never changes the market and never swaps in another one.
  • Inputs:
    • Market allowed: my markets: names separated by commas, default R_10, R_25, R_50
    • or any market of the category: [ (none) ▾ ] (default), [ synthetic indices ▾ ], [ forex ▾ ], [ stock indices ▾ ], [ cryptocurrencies ▾ ] or [ commodities ▾ ]
    • my contract types (empty = any): Deriv codes in capitals, such as DIGITOVER, DIGITUNDER. Empty by default.
    • the contract I am about to buy: pick the contract the Purchase block buys
  • Gives back: true only when all checks pass. False in every unclear case.
  • How it works: The market must be on your list (the names you wrote, or the category you chose) and must be in Deriv's live list of active markets right now, not suspended and not closed. If you wrote contract types, the contract you are about to buy must be one of them. With no names and the category on (none), any active market passes. Deriv's list is asked again when needed, and a slow answer (8 seconds) counts as no answer.
  • Example:
┌─ 2. Purchase conditions ──────────────────────────────┐
│ if  < Market allowed: my markets [ R_10, R_25, R_50 ] │
│       or any market of the category [ (none) ▾ ]      │
│       my contract types (empty = any) [ DIGITOVER ]   │
│       the contract I am about to buy [ Over ▾ ] >     │
│ then  Purchase [ Over ▾ ]                             │
└───────────────────────────────────────────────────────┘

The bot buys only when it is trading R_10, R_25 or R_50, the market is open at Deriv, and the contract is Over.

  • Good to know:
    • Refusals: market names with other characters than letters, digits and _; no category chosen; contract types that are not capital letters and digits separated by commas; contract types written but no contract chosen.
    • When it says no, the journal says why once: the market service is not available, the market is not known yet, Deriv's list could not be read, the market is not in the live list, it is suspended or closed, it is not on your list, or the contract is not allowed.
    • It does not say anything about your chance to win.

Barrier switcher

  • Kind: BRINOVS custom, extra block (no catalogue number)
  • Type id: bnv_barrier_switcher
  • Shape: Value block (gives a number, a digit)
  • Where it goes: In the Prediction box of Trade options, or in a barrier box of the Hedge purchase. A barrier is the digit your digit contract is measured against.
  • What it does: Gives the digit to trade and changes it between rounds, from a list you write. It is the little sister of the Market switcher, for digits instead of markets.
  • Inputs:
    • Barrier switcher: my barriers: digits from 0 to 9 separated by commas, default 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (at least 2 different)
    • mode: [ next barrier every N rounds ▾ ] (default), [ next barrier after N losing rounds in a row ▾ ] or [ random barrier every N rounds ▾ ]
    • N: a whole number from 1 to 1000, default 5
    • skip digits that do not fit: [ the contracts of my bot ▾ ] (default), [ Over ▾ ], [ Under ▾ ], [ Over and Under ▾ ] or [ nothing (use all) ▾ ]
  • Gives back: the digit to use now.
  • How it works: The block counts finished rounds. When the count reaches N, it moves to the next digit in your list (back to the first after the last one), or picks another digit at random, never the same twice in a row. A digit the contract cannot use is skipped, and the journal says so: Over takes 0 to 8, Under takes 1 to 9, Matches and Differs take 0 to 9. The counts are saved, so a refresh does not lose them. Pretend rounds count on their own counter.
  • Example:
┌─ 1. Trade parameters ──────────────────────────────────────┐
│ Prediction: ( Barrier switcher: my barriers [ 3, 4, 5, 6 ] │
│              mode [ next barrier every N rounds ▾ ]        │
│              N [ 5 ]                                       │
│              skip digits that do not fit [ Over ▾ ] )      │
└────────────────────────────────────────────────────────────┘

The Prediction starts at 3. After every 5 finished rounds it moves to 4, then 5, then 6, then back to 3.

  • Good to know:
    • Refusals: a barrier that is not a single digit 0 to 9; fewer than 2 different digits; no mode or check chosen; N outside 1 to 1000; none of your digits fits the contract.
    • It does not check markets, wait for prices or limit changes per hour. Changing a digit moves no money and touches no open contract.
    • It does not make a win more likely.

Build a bot with these blocks

BRINOVS is free to open. Sign in with Deriv, open the Bot Builder, and try everything on a demo account.

Open BRINOVS

BRINOVS Digits is a free bot builder and trading page built on Deriv's Bot Builder. Trading carries risk and you can lose money. Nothing in this guide is financial advice or a promise of profit. Test every bot on a demo account first.

Guide home · Open BRINOVS