Uploaded files are loaded as Python modules. To be recognized as a valid strategy,
your file must follow the rules below.
1. File requirements
- Must be a
.py file (any name except __init__.py)
- Must contain valid Python — files that fail to import are skipped and logged, not fatal to the bot
2. Required function
Your file must define:
def get_entry_signal(symbol):
...
-
Arguments: exactly one required argument —
symbol (string, e.g. "Volatility 75 Index").
The bot calls your function with only this argument, nothing else.
-
You may add extra parameters with default values
(e.g.
timeframe=...) for your own testing, but the bot
will never pass them — they must have defaults or the call will fail.
-
Return value: either
None (no signal this
cycle — most common) or a dict with at least a
"signal" key.
3. Return dictionary keys
{
"signal": "BUY", # required
"entry": 1234.56, # optional
"sl": 1230.00, # optional
"tp1": 1240.00, # optional
"tp2": 1245.00, # optional
"tp3": 1250.00, # optional
"reason": "..." # optional
}
| Key | Required? | Meaning |
signal |
Yes |
Must be exactly one of "BUY", "SELL",
"EXIT BUY", "EXIT SELL". Any other value
is ignored by the bot. |
entry |
No |
Your strategy's reference entry price — informational only.
The bot always uses the live bid/ask tick for the actual trade price,
not this value. |
fib |
No |
Optional Fibonacci level or note. |
sl |
No |
Suggested stop loss price. |
tp1 / tp2 / tp3 |
No |
Suggested take profit levels. |
reason |
No |
Free text explanation. |
Priority: Local strategies are always checked before
remote ones. For each symbol, the first local strategy that returns a
valid signal wins — others are skipped for that cycle.
Activation delay: The bot only reloads strategy files
when it restarts (every 10 minutes). A newly uploaded file may take up
to 10 minutes to become active.
State matters: Strategies can keep their own memory
between calls (e.g. tracking direction, last signal bar). This state lives
only in the running process — it resets every time the bot restarts.