You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,11 @@ AssemblyScript based Strategy Template for the Steer Protocol.
3
3
4
4
Start building on [Steer Protocol](https://steer.finance) with our AssemblyScript template. Expand your smart contract capabilities with off-chain compute! More info can be found here: [Documentation](https://docs.steer.finance/steer-apps/writing-an-app)
5
5
6
-
## Tip!
6
+
This is a template example of how to make a liquidity provision strategy that acts similarly to a stop loss. The strategist picks a percent and recent candles are passed into the strategy. From the recent price, a position is made with the upper tick set to the current price, and the lower tick at the precent down from the current price, like a stop loss. This would likely not be a great strategy for most assets/situations, be smart if you want to use this strategy.
7
7
8
-
[Use our one-click in-browser development environment](https://bit.ly/3BsQ3DT)
8
+
## Parameters
9
+
10
+
This strategy only accepts one parameter from the data connectors: any OHLC type object.
9
11
10
12
## Project Structure
11
13
Apps have three external functions that are used by the Steer system. Additional methods, classes, or varaibles can be used in conjunction with these required functions for any desired behavior. For more information please see the app interface. This design means, that as a developer, you only need to implement the methods which are required for the app to work.
@@ -23,12 +25,23 @@ Below are the significant files and folders which you will want to get familiar
23
25
```
24
26
25
27
## Project Setup
26
-
Once the template has been cloned, you will need to install the project dependencies. This can be done via the following command:
28
+
Once the repository has been cloned, you will need to install the project dependencies. This can be done via the following command:
27
29
28
30
```yarn install```
29
31
30
32
INFO
31
33
You will notice that there is a post-install script which will compile the ./assembly source folder and populate the ./build folder. This is done to make it easier to run the tests. We will cover this later.
32
34
33
-
Once you have set up your project, you can begin defining your app.
35
+
After making chenges to the assemblyscript code, compile and build the wasm files with the command:
36
+
37
+
```yarn asbuild```
38
+
39
+
You will find a number of webassembly related files in the ./build folder.
40
+
41
+
The testing suite can be found the ./tests source folder, unit tests are written in index.test.ts and can be configured there.
42
+
43
+
To run the testing suite, run:
44
+
45
+
```yarn test```
34
46
47
+
For more in depth testing of the strategy and performance try using Steer's backtesting toolkit to simulate realistic conditions.
0 commit comments