Skip to content

Commit

Permalink
Merge pull request #34 from thanhnguyennguyen/v1.0.4-beta
Browse files Browse the repository at this point in the history
v1.0.4-beta: update docs
  • Loading branch information
thanhnguyennguyen authored Mar 3, 2020
2 parents 94f571c + 78ab47c commit a417041
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,59 +195,59 @@ npm install --save trading-indicator
- Parameter:
- MA_FAST (should be 50)
- MA_SLOW (should be 200)
- Exchange name
- Symbol
- Interval
- Exchange name
- IsFuture exchange

Sample code
```javascript
alerts = require('trading-indicator').alerts

await alerts.goldenCross(50, 200, 'BTC/USDT', '1h', 'binance', false)
await alerts.deathCross(50, 200, 'BTC/USDT', '1h', 'binance', false)
await alerts.goldenCross(50, 200, 'binance', 'BTC/USDT', '1h', false)
await alerts.deathCross(50, 200, 'binance', 'BTC/USDT', '1h', false)

// check both golden/death cross
await alerts.maCross(50, 200, 'BTC/USDT', '1h', 'binance', false) // response { goldenCross: false, deathCross: false }
await alerts.maCross(50, 200, 'binance', 'BTC/USDT', '1h', false) // response { goldenCross: false, deathCross: false }
```

- RSI in overBought/overSold area
- Parameter:
- RSI Period
- OverBoughtThreshold (75)
- OverSoldThreshold (25)
- Exchange name
- Symbol
- Interval
- Exchange name
- IsFuture exchange

Sample code
```javascript
alerts = require('trading-indicator').alerts
await alerts.rsiCheck(14, 75, 25, 'BTC/USDT', '1h', 'binance', false)
await alerts.rsiCheck(14, 75, 25, 'binance', 'BTC/USDT', '1h', false)
// Test RSIcheck
// { overBought: false, overSold: false, rsiVal: 27.81 }
```

- Price crosses SMA/EMA
- Parameter:
- MA Period
- Exchange name
- Symbol
- Interval
- Exchange name
- IsFuture exchange

Sample code
```javascript
alerts = require('trading-indicator').alerts
await alerts.priceCrossSMA(14, 'BTC/USDT', '1h', 'binance', false)
await alerts.priceCrossSMA(14, 'binance', 'BTC/USDT', '1h', false)
//Test SMA cross
// { cross: true, direction: 'up' }
await alerts.priceCrossEMA(14, 'BTC/USDT', '1h', 'binance', false)
await alerts.priceCrossEMA(14, 'binance', 'BTC/USDT', '1h', false)
// Test EMA cross
// { cross: true, direction: 'down' }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trading-indicator",
"version": "1.0.4",
"version": "1.0.4-beta",
"description": "provide trading technical indicator values",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a417041

Please sign in to comment.