Giter VIP home page Giter VIP logo

forex.analytics's People

Contributors

andreialecu avatar askmike avatar mkmarek avatar vaunus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forex.analytics's Issues

ConvertOHLC does not seem to work correctly.

I have some (dummy) candlestick data with an interval of 30mins:

const orig = [
    {
        open: 1.11399,
        high: 1.11399,
        low: 1.11389,
        close: 1.11389,
        time: 1435701600
    },
    {
        open: 1.11389,
        high: 1.83321,
        low: 1.10213,
        close: 1.76,
        time: 1437501600
    }
];

I am trying to convert that to 1 hour candlesticks. I assume it should return an array of 1 candlestick because my original data set has 2 candles of 30 minutes. I convert it as follows:

function convertTo1HOhlc(candlesticks) {
    return analytics.convertOHLC(candlesticks, 3600);
}

console.log(convertTo1HOhlc(orig));

That outputs the following:

[ { open: 1.11399,
    low: 1.11389,
    high: 1.11399,
    close: 1.11389,
    time: 1435701600 },
  { open: 1.11389,
    low: 1.10213,
    high: 1.83321,
    close: 1.76,
    time: 1437501600 } ]

This does not look correct to me.
Is this a bug? Or am I missing something?

unable to build on macosx

Tried with:
OSX 10.11.x
OSX 10.12.3

Result:
../src/functions/findStrategy.cpp:58:5: error: initializer 'AsyncProgressWorker' does not name a non-static data
member or base class; did you mean the base class 'AsyncProgressWorkerBase'?
: AsyncProgressWorker(callback_)
^~~~~~~~~~~~~~~~~~~
AsyncProgressWorkerBase
../src/functions/findStrategy.cpp:52:33: note: base class 'Nan::AsyncProgressWorker' (aka
'AsyncProgressWorkerBase') specified here
class FindStrategyAsyncWorker : public Nan::AsyncProgressWorker
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/analytics/src/functions/findStrategy.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/user/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)

Also optimize lookback periods for indicators

Hey,

currently, zenbot, a cryptocurrency trading bot, is evaluating two different genetic optimization approaches.

  • In the first approach, the different parameters of the existing strategies are optimized (zenbot Issue 298 , zenbot PR 299).
  • The second approach is using your forex.anayltics, which shows rather promising results in simulations (zenbot Issue 385 , zenbot PR 389).

It would be very interesting to not only optimize the selection of indicators for buy/sell decision, but also optimize the lengths of the lookback period for those decisions. Currently the length is fixed, for example at 14 for RSI.

Is forex.analytics still actively maintained and would this be in the scope of development?

Thanks!
-crubb

Build failed

LINK : fatal error LNK1181: cannot open input file '..\lib\ta-lib\lib\ta_libc_csr.lib' [C:\Users\kenke\Projects\zenbot\node_modules\forex.analytics\build\analytics.vcxproj]

Commiting talib free

Hi !
Can you commit the branch without talib in stable please ?
I cant use talib on windows and wich to use your work with @askmike gekko
Thank you

Issue With Building

Mac OS
node-gyp is installed
Clone repo and run npm install
Build failure on FindStrategy.o
CXX(target) Release/obj.target/analytics/src/functions/findStrategy.o ../src/functions/findStrategy.cpp:58:5: error: initializer 'AsyncProgressWorker' does not name a non-static data member or base class; did you mean the base class 'AsyncProgressWorkerBase'? : AsyncProgressWorker(callback_) ^~~~~~~~~~~~~~~~~~~ AsyncProgressWorkerBase ../src/functions/findStrategy.cpp:52:33: note: base class 'Nan::AsyncProgressWorker' (aka 'AsyncProgressWorkerBase<char>') specified here class FindStrategyAsyncWorker : public Nan::AsyncProgressWorker ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [Release/obj.target/analytics/src/functions/findStrategy.o] Error 1

Error with the feature/ branch cant install ??

Warning 1 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 313 1 analytics
Error 2 error C3861: '__uncaught_exception': identifier not found C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 4774 1 analytics
Warning 3 warning C4244: '=' : conversion from 'const double' to 'long', possible loss of data C:\Users\Pascal\git\forex.analytics\src\cpp\TradingSimulator.cpp 33 1 analytics
Warning 4 warning C4244: '=' : conversion from 'const double' to 'long', possible loss of data C:\Users\Pascal\git\forex.analytics\src\cpp\TradingSimulator.cpp 80 1 analytics
Warning 5 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 313 1 analytics
Error 6 error C3861: '__uncaught_exception': identifier not found C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\concrt.h 4774 1 analytics
Warning 7 warning C4244: 'initializing' : conversion from 'double' to 'unsigned int', possible loss of data C:\Users\Pascal\git\forex.analytics\src\cpp\BinaryTreeGeneticAlgo.cpp 45 1 analytics
Warning 8 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data C:\Users\Pascal\git\forex.analytics\src\cpp\nodes\IndicatorTreeNode.cpp 16 1 analytics
Error 9 error C2512: 'Nan::AsyncProgressWorkerBase' : no appropriate default constructor available c:\users\pascal\git\forex.analytics\src\include\export\findStrategy\FindStrategyAsyncWorker.h 18 1 analytics
Error 10 error C2614: 'FindStrategyAsyncWorker' : illegal member initialization: 'AsyncProgressWorker' is not a base or member c:\users\pascal\git\forex.analytics\src\include\export\findStrategy\FindStrategyAsyncWorker.h 18 1 analytics
Warning 11 warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc c:\users\pascal\git\forex.analytics\src\include\export\findStrategy\FindStrategyAsyncWorker.h 42 1 analytics
12 IntelliSense: "AsyncProgressWorker" is not a nonstatic data member or base class of class "FindStrategyAsyncWorker" c:\Users\Pascal\git\forex.analytics\src\include\export\findStrategy\FindStrategyAsyncWorker.h 17 5 analytics
13 IntelliSense: no default constructor exists for class "Nan::AsyncProgressWorkerBase" c:\Users\Pascal\git\forex.analytics\src\include\export\findStrategy\FindStrategyAsyncWorker.h 18 2 analytics

Build error

Trying to install on Ubuntu 16.04LTS

node: v7.5.0
npm: v4.1.2
node-gyp: v3.5.0

get the following error:

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:192:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-63-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
gyp ERR! cwd /home/genx/gekko/node_modules/forex.analytics
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm ERR! Linux 4.4.0-63-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "forex.analytics"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node-gyp configure && node-gyp build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node-gyp configure && node-gyp build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the forex.analytics package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure && node-gyp build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs forex.analytics
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls forex.analytics
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/genx/gekko/npm-debug.log

See attached debug log. Any help is much appreciated :)

npm-debug.txt

Questions about fitness and simulated orders

First of all thanks for this awesome project!

I am looking into using this project to come up with strategies for cryptocurrency markets, and for that I have a few questions:

  • fitness (with fees): we have to pay fees per trade, I could calculate that here, but then the "best" proposed algorithm might not be the most profitable at all since fees were not taken into consideration on the genetic selection level. Fees are the same for every trade (assuming all trades are either limit "maker" or market "taker" orders). This only changes if the trade size is different, which I guess is never, right? (fees are percentage based on order size.)
  • spread and simulated order type: cryptocurrency markets are not that liquid and can sometimes have big spreads. When looking at the code it seems that buy orders assume the buy price is equal to the high of that candle, is there any reasoning behind this (I guess worst case scenario)?

Thanks!

Mike

warning: ‘OperatorStrings’ defined but not used

CI Job ID: #339849087 (line 583 and so on)

../src/../include/nodes/OperatorTreeNode.h:7:21: warning: ‘OperatorStrings’ defined but not used [-Wunused-variable]
 static const char * OperatorStrings[] = { "And", "Or", "Xor"};
                     ^
In file included from ../src/BinaryTreeChromosome.cpp:5:0:
../src/../include/nodes/IndicatorTreeNode.h:5:21: warning: ‘SignStrings’ defined but not used [-Wunused-variable]
 static const char * SignStrings[] = { ">", "<" };
                     ^
In file included from ../src/nodes/TreeNode.cpp:4:0:
../src/nodes/../../include/nodes/OperatorTreeNode.h:7:21: warning: ‘OperatorStrings’ defined but not used [-Wunused-variable]
 static const char * OperatorStrings[] = { "And", "Or", "Xor"};
                     ^
In file included from ../src/nodes/TreeNode.cpp:5:0:
../src/nodes/../../include/nodes/IndicatorTreeNode.h:5:21: warning: ‘SignStrings’ defined but not used [-Wunused-variable]
 static const char * SignStrings[] = { ">", "<" };
                     ^

Second call to findStrategy

The first call findStrategy returns result as expected, but second or more call returns a strategy with fitness 0.
Thanks for this great library.

Output Doesn't Make Sense

Been running on multiple markets outside of forex such as stocks and other currencies. Is there an indicator that is hard coding a PIP value somewhere? I am getting outputs with values for indicators that make zero sense or are impossible so wondering if it is skewed up a bit since the prices are much higher than forex. Also, the indicators don't seem to line up.

For example, I compiled a list of 1 year of minute candle data. I applied this and ran the example. js.

Issues

  • The output values for indicators like ATR are way to high. I am seeing values of 17,000 which is impossible for that indicator. Is amplified due to forex being 3-4 decimals for a PIP where the values I am working on could be 1000x of that for a "pip".
  • Indicators are conflicting. I am getting some results with an AND operator of a single indicator being two opposite values. For example. I got BOP being > 1344 on the left side and then the right side would be BOP < 300 which is also impossible.

Lastly, does this output translate to indicators to apply on a 30 minute time frame since that is the conversion used in the example.js file??

File missing at build on Win x86-64

I already have windows-build-tools through npm
When installing forex.analytics I encounter this error:
LINK : fatal error LNK1181: cannot open input file '..\lib\ta-lib\lib\ta_libc_csr.lib' [C:\Users\user1\Desktop\FAn\forex.analytics-master\build\analytics.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)

I've checked the repo and there is no ta_libc_csr.lib file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.