Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
saleh-old committed Feb 17, 2019
1 parent 72b564f commit 4cb29b6
Show file tree
Hide file tree
Showing 72 changed files with 7,518 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# to set arrays use only this syntax: "item1,item2". Yes, no spaces, no anything.

# Accepted values are: 'backtest', 'livetrade', 'fitness'.
TRADING_MODE=backTest
TRADING_MODE=backtest

DEBUG_MODE=0

Expand Down Expand Up @@ -33,4 +33,4 @@ SENTRY_DSN=
LOG_DRIVER=file

# accepted values are: 'cpu' and 'gpu'
TENSORFLOW_COMPUTING_DEVICE=cpu
TENSORFLOW_COMPUTING_DEVICE=cpu
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,10 @@ Jesse(the name is taken from of the legendary trader, Jesse Livermore) is a free

Jesse is written in TypeScript and uses Google's TensorflowJS for machine learning. The ideal goal of this project is to make it easy for everyone to use it with a minimum understanding of AI and just focusing on your trading strategies.

## update February, 8:
I have released 4 repositories so far:

https://github.com/jesse-ai/jesse-cli (Jesse's CLI for easier development)<br>
https://github.com/jesse-ai/indicators (Jesse's indicators package)<br>
https://github.com/jesse-ai/docs (Jesse's documentation) <br>
https://github.com/jesse-ai/notifications-telegram (Telegram driver for notifications) <br>

## Roadmap
If you're interested in knowing the latest progress of Jesse, check out the [roadmap](https://github.com/jesse-ai/jesse/projects/1).

## Slack
Here is Jesse's Slack channel, a community for Jesse’s contributors. Join it to receive daily updates of the devlopement process:

https://join.slack.com/t/jesse-plo4416/shared_invite/enQtNTExOTc3NTU2NDM0LWUzMjMwMjM1MDNjMzY1MGEyMGFlYjM4ZTYzN2U2OTJkNGVmZTYzOWIzNWU3MzZkZDI1YzRhODNjZDkzMjcyYjk.

## Release date
Jesse's initial release will happen at the early days of February. Click on the watch of the repository.
https://join.slack.com/t/jesse-plo4416/shared_invite/enQtNTExOTc3NTU2NDM0LWUzMjMwMjM1MDNjMzY1MGEyMGFlYjM4ZTYzN2U2OTJkNGVmZTYzOWIzNWU3MzZkZDI1YzRhODNjZDkzMjcyYjk.
40 changes: 40 additions & 0 deletions config/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export default {
// The the starting balance of the wallet in USD:
startingBalance: parseInt(process.env.STARTING_BALANCE),
// If not, how many dollars should it use:
positionSize: parseInt(process.env.STARTING_BALANCE),
// Should it use all of account's balance for positions:
tradeWithWholeBalance: !!parseInt(process.env.COMPOUNDING_POSITION_SIZING),

// list of currencies to consider
symbolsToConsider: process.env.SYMBOLS.split(','),
// The symbol to trade. We'll make this an array in the future.
symbolToTrade: process.env.TRADING_SYMBOL.toUpperCase(),

// list of timeFrames to consider
timeFramesToConsider: process.env.TIMEFRAMES.split(','),
// Which candle type do you intend trade on:
timeFrameToTrade: process.env.TRADING_TIMEFRAME.toLowerCase(),

// Accepted values are: 'backtest', 'livetrade', 'fitness'.
tradingMode: process.env.TRADING_MODE,

// candle files for a single period of time
candleFiles: {
folder: 'BitFinex',

// [7 months] [training data]
// date: '2018-03-22.2018-10-17'
// [2 months] [testing data]
// date: '2018-08-19.2018-10-17'
// 2 hours period use for feature testing backTest
date: '2019-01-11.2019-01-11'
},

// this would enable many console.log()s in the code, which are helpful for debugging.
debugMode: !!(parseInt(process.env.DEBUG_MODE)),

// is it running in jest tests. This value is set inside
// jest files whenever running a jest test file.
isTesting: false,
}
12 changes: 12 additions & 0 deletions config/dashboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default {
dashboardItems: {
info: true,
candles: true,
positions: true,
guide: false,
errors: true,
warnings: true,
trades: true,
orders: true,
}
}
16 changes: 16 additions & 0 deletions config/exchanges.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
// The exchange market we're trading in. Used in for http and websocket requests.
marketToTradeIn: process.env.EXCHANGE,

// trading fee (in percent) per order. In our backTests, we always consider ourselves as the take
tradingFee: parseFloat(process.env.FEE),

// API keys and secrets of exchanges.
exchanges: {
Bitfinex: {
baseURL: process.env.BITFINEX_URL,
apiKey: process.env.BITFINEX_API_KEY,
apiSecret: process.env.BITFINEX_API_SECRET,
},
},
}
15 changes: 15 additions & 0 deletions config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import app from './app';
import logging from './logging';
import exchanges from './exchanges';
import sentry from './sentry';
import dashboard from './dashboard';
import notifications from './notifications';

export default {
...app,
...logging,
...exchanges,
...sentry,
...dashboard,
notifications: { ...notifications }
};
20 changes: 20 additions & 0 deletions config/logging.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default {
// here you can filter items that you wish yo see in reports after the trading is done.
reportItems: {
averageR: true,
},

// here you can filter items that you intend to see when debugMode is enabled. (work in progress)
debugItems: {
orderSubmission: true,
shorterPeriodCandles: true,
executedOrderDetection: true,
executedOrderStep: true,
activePosition: true,
progressBar: true,
others: true
},

// Accepted values are null and 'file'. ('database' will be added.)
logDriver: process.env.LOG_DRIVER.toLowerCase(),
}
41 changes: 41 additions & 0 deletions config/notifications.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import Driver from 'jesse-notifications-telegram';
import NotificationsDriverInterface from "../core/services/Notifier/NotificationsDriverInterface";

interface NotificationsConfigInterface {
enable: boolean;
driver: NotificationsDriverInterface;
events: eventsInterface;
}

interface eventsInterface {
errors: boolean;
liveTradeStarted: boolean;
liveTradeStopped: boolean;
submittedOrders: boolean;
cancelledOrders: boolean;
executedOrders: boolean;
openedPosition: boolean;
updatedPosition: boolean;
}

const notifications: NotificationsConfigInterface = {
// setting this to 0 will disable notifications entirely
enable: !!(parseInt(process.env.ENABLE_NOTIFICATIONS)),

// set the imported notifications driver
driver: new Driver(),

// events to report reported
events: {
errors: true,
liveTradeStarted: true,
liveTradeStopped: true,
submittedOrders: true,
cancelledOrders: true,
executedOrders: true,
openedPosition: true,
updatedPosition: true,
},
}

export default notifications;
5 changes: 5 additions & 0 deletions config/sentry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
useSentryForExceptionReporting: !!parseInt(process.env.ENABLE_SENTRY),

sentryDSN: process.env.SENTRY_DSN,
}
6 changes: 6 additions & 0 deletions core/exceptions/ConflictingOrders.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default class ConflictingOrders extends Error {
constructor(message: string) {
super(message);
this.name = 'ConflictingOrders';
}
}
6 changes: 6 additions & 0 deletions core/exceptions/EmptyPosition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default class EmptyPosition extends Error {
constructor(message: string) {
super(message);
this.name = 'EmptyPosition';
}
}
Loading

0 comments on commit 4cb29b6

Please sign in to comment.