Comments (1)
With a support/resistance indicator, I'm assuming the context comes from the value of the current price in relation to the support/resistance line, similar to a bbands strategy. It might be best to calculate a percentage of where the current price is between the two, or work off true/false if it crosses the line. I don't have a good grasp on what's going on with the price scaling in the environment but anticipate that if they are scaled independently that the relationship between the price and the support/resistance lines would get skewed.
There's a school of thought that you really don't want to feed the network stuff that it can calculate on it's own mathematically (not sure how true this is). For example, if RSI is a mathematical function of price, then feeding it in is just adding more data for it to determine the relevance of and clutters the signal. However, if the value is based on data outside of the window that the LSTM layer is looking at, then there may be value added.
This is on my list of things to try, currently trying to get the environment isolated from hypers to better test things like this.
A really rough implementation of an ema crossover/under that I used in a different environment looks like this, if it helps anyone:
self.series['emaCrossover'] = np.where(self.series['MA_5'] < self.series['MA_10'], 1, 0)
self.series['emaCrossunder'] = np.where(self.series['MA_5'] > self.series['MA_10'], 1, 0)
Also, I don't see anything for support/resistance in the talib or jhtalib libraries. However, there's this (I didn't write it) that would be easy to implement:
#Pivot Points, Supports and Resistances
def PPSR(df):
PP = pd.Series((df['high'] + df['low'] + df['close']) / 3)
R1 = pd.Series(2 * PP - df['low'])
S1 = pd.Series(2 * PP - df['high'])
R2 = pd.Series(PP + df['high'] - df['low'])
S2 = pd.Series(PP - df['high'] + df['low'])
R3 = pd.Series(df['high'] + 2 * (PP - df['low']))
S3 = pd.Series(df['low'] - 2 * (df['high'] - PP))
psr = {'PP':PP, 'R1':R1, 'S1':S1, 'R2':R2, 'S2':S2, 'R3':R3, 'S3':S3}
PSR = pd.DataFrame(psr)
df = df.join(PSR)
return df
from tforce_btc_trader.
Related Issues (20)
- Error: Cannot find module 'webpack' HOT 3
- ModuleNotFoundError: No module named 'data.data' HOT 2
- (psycopg2.ProgrammingError) relation "coinbase" does not exist HOT 3
- Live-mode NotImplementedError HOT 3
- Switching to conv1d/ LSTM-FCN representation
- Table runs does not exist HOT 5
- Visualisation issue HOT 3
- Non-existent input ^ConstantFoldingCtrl/ppo/cond/add/Switch_0 for node ConstantFolding/ppo/cond/strided_slice_2/stack_const_axis HOT 11
- Data Source HOT 1
- Volatile GPU-Util is low HOT 6
- Actions exploration HOT 4
- v0.2 Save trials object to resume on next run HOT 2
- Python hung (likely because of too many psycopg2 connections) during attempted impmentation of https://github.com/deepmind/scalable_agent HOT 1
- Suggestion: setup docker to be easy to develop. HOT 2
- Can't find run.py? HOT 1
- Google Colab Tutorial not showing
- Typeerror occurred at tensorforce 0.4.3 When run hypersearch.py
- How to add new RL features from media news to train them?
- This is a question HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tforce_btc_trader.