forked from gazbert/bxbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
strategies.yaml
46 lines (40 loc) · 2.51 KB
/
strategies.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
############################################################################################
# Trading Strategy YAML config.
#
# - You configure the loading of your strategy using either a className or a beanName field.
# - All fields are mandatory unless stated otherwise.
# - Multiple strategy blocks can be listed.
# - The indentation levels are significant in YAML: https://en.wikipedia.org/wiki/YAML
#
# See the README "How do I write my own Trading Strategy?" section for full details.
############################################################################################
---
strategies:
# A unique identifier for the strategy. The markets.yaml tradingStrategyId entries reference this.
# Value must be an alphanumeric string. Underscores and dashes are also permitted. E.g. scalping-strategy
- id: scalping-strategy
# A friendly name for the strategy. Value must be an alphanumeric string. Spaces are allowed. E.g. My Super Strat
name: Basic Scalping Strat
# The description value is optional.
description: >
A simple trend following scalper that buys at the current BID price,
holds until current market price has reached a configurable minimum percentage gain,
and then sells at current ASK price, thereby taking profit from the spread.
Don't forget to factor in the exchange fees!
# For the className value, you must specify the fully qualified name of your Strategy class for the Trading Engine
# to load and execute. This class must be on the runtime classpath.
# If you set this value to load your strategy, you cannot set the beanName value.
#
#className: com.gazbert.bxbot.strategies.ExampleScalpingStrategy
# For the beanName value, you must specify the Spring bean name of you Strategy component class
# for the Trading Engine to load and execute.
# You will also need to annotate your strategy class with `@Component("exampleScalpingStrategy")` -
# take a look at ExampleScalpingStrategy.java. This results in Spring injecting the bean.
# (see https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/stereotype/Component.html)
# If you set this value to load your strategy, you cannot set the className value.
beanName: exampleScalpingStrategy
# The configItems section is optional and allows you to set custom key/value pair config items. This config
# is passed to your Trading Strategy when the bot starts up.
configItems:
counter-currency-buy-order-amount: 20
minimum-percentage-gain: 2