Signals and operations
- Lesson 3 of 7
- Using Okkana
- steps
- 7
- terms explained
- 7
About this lesson
What you'll learn
What a Signal is and how Okkana keeps measuring it after the alert, how a take profit and a stop loss close its virtual position, and how you record what you actually did in an operation.
Terms in this lesson
- Alert and SignalStep 1 · The alert and the Signal
- Entry reference priceStep 2 · Entry price and windows
- MFE and MAEStep 3 · Best and worst moment
- Virtual positionStep 4 · Virtual position and PnL
- Take profit and stop lossStep 5 · Take profit and stop loss
- OperationStep 6 · Your operation
- Taken vs discardedStep 7 · Your operations
The alert and the Signal
When all of a bot's conditions are true, two things happen. The alert is the notification: it reaches the bell, the live feed and, if the bot has the channel on, your webhook. It tells you what happened, and that's all it does.
The Signal is the permanent record of that moment. It keeps the market, the direction, the entry reference price and the value of every condition when the bot fired. After the alert has been delivered, Okkana keeps tracking the Signal: what the price did after 5 minutes, 15 minutes, up to 24 hours.
A Signal is the hypothetical performance of the market after the trigger. No order was placed on Binance.
Entry price and windows
At the trigger, Okkana records the entry reference price: the last price at that moment. Every later number is measured from it.
The Signal is checked after 5m, 15m, 30m, 1h, 4h, 12h and 24h. A window that hasn't elapsed yet is hatched. For a LONG Signal the return is (price − entry) / entry. For a SHORT it's (entry − price) / entry, so a positive number always means the market moved the way the bot expected.
Nothing here uses leverage: a 2% move is 2%. A bot set to alert only has no direction, and its Signals report the plain market move.
Best and worst moment
The price at a window hides what happened on the way. MFE, the maximum favorable excursion, is the best return the Signal reached. MAE, the maximum adverse excursion, is the worst. Both are measured from the entry price, in the bot's direction, over the 24 hours after the trigger.
A Signal can end at +1% after falling 3% first, or after rising 6%. Averaged over many Signals, MFE and MAE are the numbers to look at when choosing a take profit, a stop loss and a maximum holding time.
For a SHORT the favorable side is down: MFE comes from the lowest price and MAE from the highest.
Virtual position and PnL
Each Signal has a virtual position: a hypothetical position of 1,000 on the market, opened at the entry price. It only keeps score and sends nothing to Binance.
Gross PnL is the price move on those 1,000. On a Perpetual, every Binance funding settlement while the position is open is added: with a positive rate the long pays and the short receives, with a negative rate it's the other way round. Fees are the market's taker fee on both sides. Net PnL is gross plus funding minus fees.
The percentage move is the main figure. The money only makes Signals comparable.
Spot has no funding and no SHORT: selling short needs a derivative. A Spot bot is LONG or alert only.
Take profit and stop loss
A bot can have exit levels, as a percentage move from the entry: for example a take profit of +3% and a stop loss of −1.5%. They belong to the bot, and both are optional.
When the price reaches a level, the Signal's virtual position closes with the reason TAKE_PROFIT or STOP_LOSS, so the bot's statistics reflect its exit rule. Without levels the position closes at 24 hours, or at expiration on a dated Future. When one check reaches both levels, the stop loss counts. The 5m to 24h window returns don't change either way.
A Signal keeps the levels the bot had when it fired. Editing the bot only affects later Signals.
Your operation
Okkana never trades, so what you actually did is yours to record. An operation is that record: one Signal has at most one, with a single entry and a single exit. A Signal without an operation is pending.
On a pending Signal you can confirm the entry or discard it, for one you didn't take. Confirming asks for a direction, an entry price, an entry time and a notional. They start as the bot's direction, the Signal's entry price and trigger time, and 1,000, and you can edit all of them. When the bot is alert only you choose the direction, except on Spot, where every operation is LONG.
On an open operation you register the exit: a price, a time and a reason, take profit, stop loss or manual (plus contract expiration on a dated Future). A closed operation can be reopened, and undo takes any state back to pending.
What you record never changes the Signal or the bot's statistics. Exit alerts follow the same line: only an open operation alerts, measured from the entry and direction you entered and with the levels the Signal fired with.
Your operations
With operations recorded, Okkana adds your own numbers next to the bot's. Your operations shows the counts by state, the share of closed operations that ended positive, the average return, the price move, funding, fees and net PnL, and how many exits came from each reason. Funding comes from the actual Binance settlements between your entry and your exit, and fees are the market's taker fee on both sides.
Taken vs discarded sets the average directional return, at each window, of the Signals you took against the ones you discarded. It answers whether your choices did better than the bot would have, and it only exists for bots with a direction.
The signals report exports one row per Signal as CSV or Excel, with the bot's result next to yours. Discarded Signals are never included.
These lessons explain what each number measures. They are not trading advice, and the lesson charts use simulated data. Preview build: market data on this site is simulated.