Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 39,266
» Latest member: jenetDag
» Forum threads: 929
» Forum posts: 6,921
Full Statistics
|
Online Users |
There are currently 412 online users. » 0 Member(s) | 412 Guest(s)
|
Latest Threads |
Gekko development status ...
Forum: Announcements
Last Post: HarrietWindsor
07-26-2025, 05:05 AM
» Replies: 1,131
» Views: 1,449,875
|
An official Gekko service...
Forum: Announcements
Last Post: Ruslanjoshua
07-24-2025, 06:27 AM
» Replies: 117
» Views: 244,820
|
Gekko 0.6 released
Forum: Announcements
Last Post: Mediks
07-14-2025, 07:09 AM
» Replies: 131
» Views: 329,968
|
New Gekko UI in the works
Forum: Announcements
Last Post: celemtine
07-03-2025, 07:24 AM
» Replies: 196
» Views: 320,447
|
Gekko with malware spotte...
Forum: Announcements
Last Post: pugoing
07-01-2025, 02:29 AM
» Replies: 228
» Views: 271,316
|
How to add Binance Future...
Forum: Technical Support
Last Post: Xavier32
10-07-2021, 02:20 PM
» Replies: 47
» Views: 133,035
|
Bittrex Configuration hel...
Forum: Bittrex
Last Post: yirzolusto
10-07-2021, 07:39 AM
» Replies: 6
» Views: 22,746
|
[Question] Why does gekko...
Forum: General Discussion
Last Post: cryptocurrency0
10-06-2021, 01:16 PM
» Replies: 16
» Views: 56,772
|
a couple of technical Que...
Forum: Technical Support
Last Post: mtom78632
10-06-2021, 11:08 AM
» Replies: 25
» Views: 71,387
|
crex24
Forum: Other exchanges
Last Post: marketingseo
10-05-2021, 09:47 AM
» Replies: 216
» Views: 509,319
|
|
|
Importing data |
Posted by: Kocojambo - 08-30-2019, 04:44 AM - Forum: Technical Discussion
- Replies (1)
|
 |
Hello everyone, I ran into a problem, when i`m start download of any data, this process is too slowly and i can`t resume it. Therefore there are many unfinished databases that I cannot connect with each other. Who can help with this? I need to either connect the downloaded databases or make it possible to continue downloading the next day.
|
|
|
CSV candle logging and more !!, code giveaway |
Posted by: PGTART - 08-28-2019, 04:09 PM - Forum: Strategy Development
- Replies (22)
|
 |
Although things can be logged in the databases
There still a lot of people in love with spreadsheets (excel, calc, etc)
So i made a comma value logger, that can easily be integrated in your own strategies.
- A filename is automatically generated (based upon when you started), or it can be set manual
In the later case, previous files with such a name would be deleted.
- It logs candles numbered with date time info, close low high etc etc
- If you wish you can add additional values to your log file, in the update function add them as extralog (be sure to coma seperate them).
- And since you investigating strategies you can also optionally prefix the filename, in the refresh call.
- Also if you like headers in your file there is an option to set them as well.
- Different linebreaks for linux vs Windows ea \n vs \r\n\ (for the notepad users )
- The data collumns C,D,E,F can be directly put in LibreOffice Calc stock chart !! (they are in the right order (code updated)
Here is my code :
which can be placed on top in your own strategies code
Code: var fs = require('fs');
var CVCandleLogger =
{
linebreaktype:'',
CandleNr:0,
firstrun: true,
stratname: '',
filename: '',
// one could log additional commma seperated info (like math results or buy sell info, using extralog)
update: function (candle, extralog = '',stratname='') {
this.CandleNr++;
if (this.filename === '') //base it upon creation time if no filename was givven
{
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
var yyyy = today.getFullYear();
var hh = String(today.getHours()).padStart(2, '0');
var mm = String(today.getMinutes()).padStart(2, '0');
today = yyyy + '-' + mm + '-' + dd + ' ' + hh + mm;
this.filename = stratname + ' log ' + today + '.log';
}
if (this.firstrun) {
var isWin = process.platform === "win32";
if(isWin)this.linebreaktype='\r\n';else this.linebreaktype='\n';
fs.access(this.filename, (err) => {
if (!err) {
console.log('previous log file name existed, deleting it');
fs.unlink(this.filename);
}
console.log('New candle data log :', this.filename);
});
this.firstrun = false;
};
var moment = String(candle.start);
console.log(moment);
var timestamp = moment.substring(0, moment.lastIndexOf(' GMT'));
var logline = this.CandleNr+','+ timestamp + ',' + candle.open + ',' + candle.close +','+ candle.high + ',' + candle.low + ',' + candle.vwp + ',' + candle.volume + ',' + candle.trades
if (extralog !== '') logline = logline + ',' + extralog;
logline=logline+this.linebreaktype;
fs.appendFile(this.filename, logline, function (err) {if (err) throw err;});
},
writeheader: function(extralog='',stratname='')
{
if (this.filename === '') //base it upon creation time if no filename was givven
{
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
var yyyy = today.getFullYear();
var hh = String(today.getHours()).padStart(2, '0');
var mm = String(today.getMinutes()).padStart(2, '0');
today = yyyy + '-' + mm + '-' + dd + ' ' + hh + mm;
this.filename = stratname + ' log ' + today + '.log';
}
if (this.firstrun) {
fs.access(this.filename, (err) => {
if (!err) {
console.log('previous log file name existed, deleting it');
fs.unlink(this.filename);
}
console.log('New candle data log :', this.filename);
});
this.firstrun = false;
};
logline ='CandleNr, date,time, open , close,high ,low,vwp ,volume , trades' ;
if (extralog!=='')logline=logline+','+extralog;
fs.appendFile(this.filename, logline, function (err) {if (err) throw err;});
}
};
if you put above code on top in your strategy just below : var config=require('../core/util/js').getconfig();
then only one line is enough to get you started with it
/* CHECK */
check: function (candle) {
CVCandleLogger.update(candle); //minimal sample find the log outputs in your gekko folder !
...
..
oh and the function CVCandlelogger.writeheader();
can be placed in your init part of your strategy, its not required but might be handy for excel / calc.
|
|
|
how to console.log profit rate ? |
Posted by: PGTART - 08-26-2019, 01:23 PM - Forum: Strategy Development
- No Replies
|
 |
Currently developing some improvements to bull/bear strategies.
It would be handy for debugging my code to get the profit % to console.log when i do a short
how to get that, is it simply the previous.close and current candle close.. or does it works a bit more advanced ?.
(as that is not guaranteed to happen in real life to get it like that).
|
|
|
Added dual stoploss to RSI_BULL_BEAR_ADX |
Posted by: PGTART - 08-24-2019, 11:14 AM - Forum: Strategy Development
- Replies (4)
|
 |
I extended a known script called: RSI_BULL_BEAR_ADX
In such a way that it has two stoploss settings, one for Bull and one for Bear markets.
However now i am wondered about generic stoploss math, as in other strategies.
Most of the times i see some percentage of the last long candle close buy to not go below that.
Sometimes i see people using a stoploss with a fixed amount, say 50 dollar or so, since last long candle close.
But i'm wondered I could also code to memorize the highest and lowest candle stops - since - my last long bu advice.
So create a stoploss that would stop after the highest values since my last buy would drop more then a certain percentage
I dont know enough of the background ideas behind RSI_BULL_BEAR_ADX if that would make sense or not.
And am worried if that would be an antipatten to code in regards to the ADX part of it.
What do you people think of alternative stoploss rules ?
And maybe you know of perhaps more afvanced stoploss rules ?
perhaps nice to see some logging of the not yet ready code as want validate it a bit more first :
I log to console:
Bear long at 9592 stoploss: bear<9113 bull< (misssing) // missing is bug
Bear short
Bull long at 9883 stoploss: bear<9389 bull<9834 // after each long i recalculate bot stoplosslevels so i can swing from bear/bull markets
Bull stoploss triggered on 9775 Bullstop was 9786
Bull long at 10450 stoploss: bear<9928 bull<10398
Bull stoploss triggered on 10483 Bullstop was 10537
Bull long at 10564 stoploss: bear<10036 bull<10511
Bull stoploss triggered on 10501 Bullstop was 10511
Bull long at 10838 stoploss: bear<10296 bull<10783
Bull stoploss triggered on 10777 Bullstop was 10848 //interesting making profit from bull to bear market.
Bear long at 9673 stoploss: bear<9189 bull<(missing)
Bear short
|
|
|
Possible to visualize more? |
Posted by: emjayar - 08-20-2019, 01:04 PM - Forum: General Discussion
- Replies (2)
|
 |
Hi there,
Is it possible with the backtesting to add more graphs (e.g., indicator output) to the result window? Currently I only see the closing price plotted there, but it would be very helpful to superimpose other information on that graph.
Thanks!
|
|
|
How to import market |
Posted by: Silent_G - 08-09-2019, 05:53 PM - Forum: Technical Discussion
- No Replies
|
 |
I'm new to this and just want some data to backtest some strategies. When I go to the backtest tab, I click the "Scan available data" button, this brings me to the importer tab, all well and good. But when trying to start a new import under market is completely blank, no drop downs, nothing. I didn't seem to do anything wrong in the install too can anyone help?
|
|
|
indicator evaluation |
Posted by: rengel - 08-05-2019, 03:29 PM - Forum: Technical Discussion
- No Replies
|
 |
There is this special directory I heard of from certain topics on GitHub, which is about the evaluation of indicators ..\test\indicators\
I don't know how to execute the files there. How are they used/executed?
Quote:ReferenceError: describe is not defined
I would like to replicate this for other indicators, since the comparison against tulip or thelike is a good starting point, but it is nicer to reference precalculated values for other technical indicators.
Thanks in advance..
rengel
|
|
|
What to do for bitstamp support |
Posted by: Dim83fr - 08-04-2019, 12:02 PM - Forum: Bitstamp
- No Replies
|
 |
Hi,
Can you explain what have to be done for bitstamp support. I'm ready to help, but I need a "to do/to check" list.
New gekko structure, new gekko API, new bitstamp api, Key management modifications, ... ?
Thank you
|
|
|
|