How to use setStartTimeZone method of Appointment class?

Hi All,
Can anyone share the code-snippets of using setStartTimeZone() method of Appointment class.

Hi All,
We are also not able to set it.. Can anybody help us.

Hi @pranjaljain  @bhagyagdesai,
a very simple version of using Time Zone will look like follows:
// first  init connection to server
ExchangeService service = new ExchangeService();
ExchangeCredentials credentials = new WebCredentials(
		"username", "password");

service.setCredentials(credentials);
service.setUrl(new URI("https://hostname/ews/Exchange.asmx"));

// Now we can get TimeZoneDefinitions supported by server
// You can just print time zones first, to see which are available
Collection<TimeZoneDefinition> timeZoneDefinitions = service.getServerTimeZones();

// Select TimeZoneDefinition you need from the collection
// In this example getting time zone by ID
// You can also use name or transition groups and etc.
TimeZoneDefinition timeZoneDefinition = null;
for (TimeZoneDefinition tzd : timeZoneDefinitions) {
	if (tzd.getId().equals("W. Europe Standard Time")) {
		timeZoneDefinition = tzd;
	}
}

// TimeZoneDefinition is now can be set to appointment
Appointment appointment = new Appointment(service);
appointment.setSubject("TimeZoneTest");
appointment.setStart(new Date());
appointment.setStartTimeZone(timeZoneDefinition);
appointment.setEnd(new Date());
appointment.setEndTimeZone(timeZoneDefinition);

appointment.save(WellKnownFolderName.Calendar);

However, different versions of Exchange work with time zones in a different way. See following link for more information:
https://msdn.microsoft.com/en-US/library/office/Dn789029(v=EXCHG.150).aspx

Hi @itbw
i tried above code only change is Time TimeZone.getDefault().getID()="Asia/Calcutta";
Collection timeZoneDefinitions = service.getServerTimeZones();
	// Select TimeZoneDefinition you need from the collection
	// In this example getting time zone by ID
	// You can also use name or transition groups and etc.
	TimeZoneDefinition timeZoneDefinition = null;
	for (TimeZoneDefinition tzd : timeZoneDefinitions) {
		System.out.println("ID = "+tzd.getId()+" name= "+ tzd.getName());
	    if (tzd.getId().equals("Asia/Calcutta")) {
	           timeZoneDefinition = tzd;
	    }
	}

so i got following exception
microsoft.exchange.webservices.data.ServiceLocalException: The time zone definition is invalid or unsupported.

Hi @bhagyagdesai,

The problem is that Exchange server operates with Microsoft time zone definitions and you try to use Java time zone ID.

It also seems, that you use an old SNAPSHOT of ewa-java-api library (which just generated TimeZoneDefinitions with Java time zone IDs). Please make sure you use the latest SNAPSHOT, because service.getServerTimeZones() was recently changed, in order to work correctly with Exchange servers..

So, in order to get right time zone, you will need to change from

 if (tzd.getId().equals("Asia/Calcutta")) {

to
 if (tzd.getId().equals("India Standard Time")) {

You can find full list of Microsoft Time Zone Index Values on following page:
https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx

Hi @itbw
I tried above with new java EWS API following is the code snippet
TimeZoneDefinition tf = null;
for (TimeZoneDefinition tzd : timeZoneDefinitions) {
System.out.println("ID = "+tzd.getId()+" name= "+ tzd.getName());
//System.out.println(TimeZone.getDefault().getDisplayName());
	    if (tzd.getId().equals("India Standard Time")) {
	    	tf = tzd;
	           break;
	    }
	}

//	System.out.println("Default timezone = "+TimeZone.getDefault().getID();

	try {
		Appointment appointment = new Appointment(service);
		appointment.setSubject("TimeZoneTest");
		appointment.setStart(new Date());
		appointment.setStartTimeZone(tf);
		appointment.setEnd(new Date());
		appointment.setEndTimeZone(tf);
		 appointment.getRequiredAttendees().add("miriamkenig2@PM-2008-R2.local");
		appointment.save(WellKnownFolderName.Calendar);
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

i got following exception
ID = Dateline Standard Time name= (UTC-12:00) International Date Line West
TZ=Dateline Standard Time
ID = UTC-11 name= (UTC-11:00) Coordinated Universal Time-11
TZ=UTC-11
ID = Samoa Standard Time name= (UTC-11:00) Samoa
TZ=Samoa Standard Time
ID = Hawaiian Standard Time name= (UTC-10:00) Hawaii
TZ=Hawaiian Standard Time
ID = Alaskan Standard Time name= (UTC-09:00) Alaska
TZ=Alaskan Standard Time
ID = Pacific Standard Time (Mexico) name= (UTC-08:00) Baja California
TZ=Pacific Standard Time (Mexico)
ID = Pacific Standard Time name= (UTC-08:00) Pacific Time (US & Canada)
TZ=Pacific Standard Time
ID = US Mountain Standard Time name= (UTC-07:00) Arizona
TZ=US Mountain Standard Time
ID = Mountain Standard Time (Mexico) name= (UTC-07:00) Chihuahua, La Paz, Mazatlan
TZ=Mountain Standard Time (Mexico)
ID = Mountain Standard Time name= (UTC-07:00) Mountain Time (US & Canada)
TZ=Mountain Standard Time
ID = Central America Standard Time name= (UTC-06:00) Central America
TZ=Central America Standard Time
ID = Central Standard Time name= (UTC-06:00) Central Time (US & Canada)
TZ=Central Standard Time
ID = Central Standard Time (Mexico) name= (UTC-06:00) Guadalajara, Mexico City, Monterrey
TZ=Central Standard Time (Mexico)
ID = Canada Central Standard Time name= (UTC-06:00) Saskatchewan
TZ=Canada Central Standard Time
ID = SA Pacific Standard Time name= (UTC-05:00) Bogota, Lima, Quito
TZ=SA Pacific Standard Time
ID = Eastern Standard Time name= (UTC-05:00) Eastern Time (US & Canada)
TZ=Eastern Standard Time
ID = US Eastern Standard Time name= (UTC-05:00) Indiana (East)
TZ=US Eastern Standard Time
ID = Venezuela Standard Time name= (UTC-04:30) Caracas
TZ=Venezuela Standard Time
ID = Paraguay Standard Time name= (UTC-04:00) Asuncion
TZ=Paraguay Standard Time
ID = Atlantic Standard Time name= (UTC-04:00) Atlantic Time (Canada)
TZ=Atlantic Standard Time
ID = Central Brazilian Standard Time name= (UTC-04:00) Cuiaba
TZ=Central Brazilian Standard Time
ID = SA Western Standard Time name= (UTC-04:00) Georgetown, La Paz, Manaus, San Juan
TZ=SA Western Standard Time
ID = Pacific SA Standard Time name= (UTC-04:00) Santiago
TZ=Pacific SA Standard Time
ID = Newfoundland Standard Time name= (UTC-03:30) Newfoundland
TZ=Newfoundland Standard Time
ID = E. South America Standard Time name= (UTC-03:00) Brasilia
TZ=E. South America Standard Time
ID = Argentina Standard Time name= (UTC-03:00) Buenos Aires
TZ=Argentina Standard Time
ID = SA Eastern Standard Time name= (UTC-03:00) Cayenne, Fortaleza
TZ=SA Eastern Standard Time
ID = Greenland Standard Time name= (UTC-03:00) Greenland
TZ=Greenland Standard Time
ID = Montevideo Standard Time name= (UTC-03:00) Montevideo
TZ=Montevideo Standard Time
ID = Bahia Standard Time name= (UTC-03:00) Salvador
TZ=Bahia Standard Time
ID = UTC-02 name= (UTC-02:00) Coordinated Universal Time-02
TZ=UTC-02
ID = Mid-Atlantic Standard Time name= (UTC-02:00) Mid-Atlantic
TZ=Mid-Atlantic Standard Time
ID = Azores Standard Time name= (UTC-01:00) Azores
TZ=Azores Standard Time
ID = Cape Verde Standard Time name= (UTC-01:00) Cape Verde Is.
TZ=Cape Verde Standard Time
ID = Morocco Standard Time name= (UTC) Casablanca
TZ=Morocco Standard Time
ID = UTC name= (UTC) Coordinated Universal Time
TZ=UTC
ID = GMT Standard Time name= (UTC) Dublin, Edinburgh, Lisbon, London
TZ=GMT Standard Time
ID = Greenwich Standard Time name= (UTC) Monrovia, Reykjavik
TZ=Greenwich Standard Time
ID = W. Europe Standard Time name= (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
TZ=W. Europe Standard Time
ID = Central Europe Standard Time name= (UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
TZ=Central Europe Standard Time
ID = Romance Standard Time name= (UTC+01:00) Brussels, Copenhagen, Madrid, Paris
TZ=Romance Standard Time
ID = Central European Standard Time name= (UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb
TZ=Central European Standard Time
ID = W. Central Africa Standard Time name= (UTC+01:00) West Central Africa
TZ=W. Central Africa Standard Time
ID = Namibia Standard Time name= (UTC+01:00) Windhoek
TZ=Namibia Standard Time
ID = Libya Standard Time name= (UTC+02:00) Tripoli
TZ=Libya Standard Time
ID = Jordan Standard Time name= (UTC+02:00) Amman
TZ=Jordan Standard Time
ID = GTB Standard Time name= (UTC+02:00) Athens, Bucharest
TZ=GTB Standard Time
ID = Middle East Standard Time name= (UTC+02:00) Beirut
TZ=Middle East Standard Time
ID = Egypt Standard Time name= (UTC+02:00) Cairo
TZ=Egypt Standard Time
ID = Syria Standard Time name= (UTC+02:00) Damascus
TZ=Syria Standard Time
ID = South Africa Standard Time name= (UTC+02:00) Harare, Pretoria
TZ=South Africa Standard Time
ID = FLE Standard Time name= (UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
TZ=FLE Standard Time
ID = Turkey Standard Time name= (UTC+02:00) Istanbul
TZ=Turkey Standard Time
ID = Israel Standard Time name= (UTC+02:00) Jerusalem
TZ=Israel Standard Time
ID = E. Europe Standard Time name= (UTC+02:00) Minsk
TZ=E. Europe Standard Time
ID = Kaliningrad Standard Time name= (UTC+03:00) Kaliningrad
TZ=Kaliningrad Standard Time
ID = Arabic Standard Time name= (UTC+03:00) Baghdad
TZ=Arabic Standard Time
ID = Arab Standard Time name= (UTC+03:00) Kuwait, Riyadh
TZ=Arab Standard Time
ID = E. Africa Standard Time name= (UTC+03:00) Nairobi
TZ=E. Africa Standard Time
ID = Russian Standard Time name= (UTC+04:00) Moscow, St. Petersburg, Volgograd
TZ=Russian Standard Time
ID = Iran Standard Time name= (UTC+03:30) Tehran
TZ=Iran Standard Time
ID = Arabian Standard Time name= (UTC+04:00) Abu Dhabi, Muscat
TZ=Arabian Standard Time
ID = Azerbaijan Standard Time name= (UTC+04:00) Baku
TZ=Azerbaijan Standard Time
ID = Mauritius Standard Time name= (UTC+04:00) Port Louis
TZ=Mauritius Standard Time
ID = Georgian Standard Time name= (UTC+04:00) Tbilisi
TZ=Georgian Standard Time
ID = Caucasus Standard Time name= (UTC+04:00) Yerevan
TZ=Caucasus Standard Time
ID = Afghanistan Standard Time name= (UTC+04:30) Kabul
TZ=Afghanistan Standard Time
ID = Pakistan Standard Time name= (UTC+05:00) Islamabad, Karachi
TZ=Pakistan Standard Time
ID = West Asia Standard Time name= (UTC+05:00) Tashkent
TZ=West Asia Standard Time
ID = Ekaterinburg Standard Time name= (UTC+06:00) Ekaterinburg
TZ=Ekaterinburg Standard Time
ID = India Standard Time name= (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
TZ=India Standard Time
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. An internal server error occurred. The operation failed.
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:158)
at microsoft.exchange.webservices.data.core.ExchangeService.internalCreateItems(ExchangeService.java:598)
at microsoft.exchange.webservices.data.core.ExchangeService.createItem(ExchangeService.java:657)
at microsoft.exchange.webservices.data.core.service.item.Item.internalCreate(Item.java:245)
at microsoft.exchange.webservices.data.core.service.item.Item.save(Item.java:373)
at testcalender.main(testcalender.java:88)
Caused by: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: An internal server error occurred. The operation failed.
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.processWebException(ServiceRequestBase.java:548)
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.validateAndEmitRequest(ServiceRequestBase.java:641)
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:62)
... 6 more

Hi @bhagyagdesai,

I have the same error as you. I'm afraid, it might be a bug in creating Bias value in Period tag.

This is the request, which client sends to server:

<t:StartTimeZone Name="(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi" Id="India Standard Time">
<t:Periods>
  <t:Period Bias="-P5DT130H39M48.0S" Name="Standard" Id="trule:Microsoft/Registry/India Standard Time/1-Standard" />
</t:Periods>
<t:TransitionsGroups>
  <t:TransitionsGroup Id="0">
	<t:Transition>
	  <t:To Kind="Period">trule:Microsoft/Registry/India Standard Time/1-Standard</t:To>
	</t:Transition>
  </t:TransitionsGroup>
</t:TransitionsGroups>
<t:Transitions>
  <t:Transition>
	<t:To Kind="Group">0</t:To>
  </t:Transition>
</t:Transitions>
</t:StartTimeZone>

Correct value for Bias should be:

<t:Period Bias="-PT5H30M" Name="Standard" Id="trule:Microsoft/Registry/India Standard Time/1-Standard" />

@itbw will you provide a Pull request for this issue? As you already did some great work on investigating this issue.

Possible ref. to #396 for the use of TimeWindow.

@serious6 I will have a closer look and prepare a pull request.

Hi @serious6, I created a pull request. I'm not sure about using Joda Time instead of old Java parsing, so I didn't make a precise description. Please have a look at PR, so I can modify it, if necessary.

the issue mainly due to
this.periods.size() <=0 and  this.transitions.size() = 0
see the following validation code.
/**
 * Validates this time zone definition.
 *
 * @throws ServiceLocalException
 *             the service local exception
 */
public void validate() throws ServiceLocalException {
	// The definition must have at least one period, one transition group
	// and one transition,
	// and there must be as many transitions as there are transition groups.
	if (this.periods.size() < 1 || this.transitions.size() < 1
			|| this.transitionGroups.size() < 1
			|| this.transitionGroups.size() != this.transitions.size()) {
		throw new ServiceLocalException(
				Strings.InvalidOrUnsupportedTimeZoneDefinition);
	}

How could  be resolve?
Thanks


⚠ Panoramas has degraded performance

In 378cbea, Panoramas ($SITE_URL_PANORAMAS) experienced degraded performance:

HTTP code: 200
Response time: 6600 ms

Resolved: Panoramas performance has improved in 98916f3 after 9 minutes.


tests: convert thrift tests to use the new ztest api

Use new ztest api in test for compression library
Use new ztest api in ThriftTest
Switch to TCP sockets for ThriftTest

Fixes #131

@SdtElectronics - could we possibly just use TLS sockets only for the TLS demo? The socket pair test is actually more useful in this case, because it allows us to test on all platforms (not just platforms that support networking).

The ZTEST commit has a typo in prj.conf that should be fixed.


[Documentation] Documentation of Types Mapping Matrix does not have footnotes

Q
A

Version
2.8

Support Question
See:
https://www.doctrine-project.org/projects/doctrine-dbal/en/2.8/reference/types.html#mapping-matrix

Please also notice the mapping specific footnotes for additional information.

There aren't any

Thanks for spotting this - it's a duplicate of already known https://github.com/doctrine/doctrine-website/issues/47 since we migrated to a new website.

For now, you can view the page on GitHub directly, it'll render footnotes as well: https://github.com/doctrine/dbal/blob/master/docs/en/reference/types.rst#mapping-matrix


fix(react-query) incorrect options type in generated infiniteQuery

Description
There is a bug in the react-query plugin that generates an incorrect type being used in the generated useInfinite queries.
Related #7897
Type of change
Please delete options that are not relevant.

[x ] Bug fix (non-breaking change which fixes an issue)

Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
How Has This Been Tested?
I've implemented a new test case that was missing on this part of the code, and this bugfix validates it.
I also tested this on my personal project and the generated types are now correct.
Checklist:

[x] I have followed the CONTRIBUTING doc and the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

I've verified that this is only different in fetcher-fetch.ts. Every other fetcher defined in the react query plugin (see the directory here) uses the correct definition for options:
fetcher-fetch.ts
const options = `options?: ${hookConfig.query.options}<${operationResultType}, TError, TData>`;

fetcher-custom-mapper.ts, fetcher-fetch-hardcoded.ts, fetcher-graphql-request.ts
const options = `options?: ${hookConfig.infiniteQuery.options}<${operationResultType}, TError, TData>`;

Hi @yomansk8!
Thank you for your contribution ⚡
I actually missed it, and it has already been done in the react-query v4 update PR: https://github.com/dotansimha/graphql-code-generator/pull/8124


gProfiler Spark implementation

Co-authored-by: Marcin Olszewski<EMAIL_ADDRESS>Co-authored-by: Marcin Pozniak<EMAIL_ADDRESS>Co-authored-by: Temitope Oluwafemi<EMAIL_ADDRESS>Spark metrics collection is now enabled in gProfiler
Changes:

Added new Spark module containing:

SparkCollector: BaseCollector implementation
Spark Metrics: metrics definition
SparkSampler: Top level class that handles Spark metrics collection
SparkAPIClient: Handles uploads of Spark metrics to Granulate API

Added new Spark relevant arguments to gprofiler.main
Added packages that the Spark implementation depends on in requirements.txt
Added instance of SparkAPIClient to gprofiler.main

Closes: https://github.com/Granulate/gprofiler/issues/602

For now running gprofiler in non-continuous mode hangs on spark collector. I created PR to sparky branch that will fix that problem. https://github.com/Granulate/gprofiler/pull/659

Looks good. I'll run some final tests and then we're good to merge, I think.


Incorrect docs on fivetran_group_connectors

https://registry.terraform.io/providers/fivetran/fivetran/latest/docs/data-sources/group_connectors
Title and usage copied and not updated from https://registry.terraform.io/providers/fivetran/fivetran/latest/docs/data-sources/group_users

Data Source: fivetran_group_users
This data source returns a list of information about all users within a group in your Fivetran account.

Example Usage
data "fivetran_group_users" "group_users" {
id = "anonymous_mystery"
}

https://github.com/fivetran/terraform-provider-fivetran/pull/171

Fix merged, docs will be updated with next release.


Configure PW2 on my ubuntu server instance to deploy application

looks like I need to do some more research as to how express applications should be built


For Nodejs Gekko Genetic algo discussion

Separating this from the other issue.

Re: http://gekkowarez.com/gekko-genetic-algorithm/
Hey @thegamecat - thanks for sharing this :)
I'm getting an error at this step though:
[gekko]$ node run-ga-parallel.js
/home/gekko/run-ga-parallel.js:206
            "data": {
            ^^^^^^

SyntaxError: Unexpected string
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:537:28)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:598:3

Any ideas?

Do I really have to long in, to download this?
Can someone give me a link?

@imkane I said this in the other thread as well, but just add the comment closure tag to wrap the specified date range option.

@mnoseworthy Thanks! Good catch.
Now I'm getting errors from my terminal1 that's running the server:
  <-- POST /api/backtest
2017-09-09 12:23:44 (INFO):     Setting up Gekko in backtest mode
2017-09-09 12:23:44 (INFO):
2017-09-09 12:23:44 (INFO):     Setting up:
2017-09-09 12:23:44 (INFO):              Trading Advisor
2017-09-09 12:23:44 (INFO):              Calculate trading advice
  xxx POST /api/backtest 500 413ms -

  Error: non-error thrown: Child process has died.
      at Object.onerror (/home/gekko/node_modules/koa/lib/context.js:105:40)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Has anyone seen this before?

@imkane This is due to your trading method being configured improperly, post your gekkoConfig object

Ok, I think I'm slowly getting it lol
In config.js:
// RSI settings:
config.RSI = {
  interval: 8,
  thresholds: {
    low: 29,
    high: 68,
    // How many candle intervals should a trend persist
    // before we consider it real?
    persistence: 1
  }
};

In run-ga-parallel.js:
"gekkoConfig": {
                "watch": {
                    "exchange": "gdax",
                    "currency": "BTC",
                    "asset": "LTC"
                },
                "paperTrader": {
                    "fee": 0.25,
                    "slippage": 0.05,
                    "feeTaker": 0.25,
                    "feeUsing": "maker",
                    "simulationBalance": {
                        "asset": 1,
                        "currency": 100
                    },
                    "reportRoundtrips": true,
                    "enabled": true
                },
				"writer": {
					"enabled": false,
					"logpath": ""
				},
                "tradingAdvisor": {
                    "enabled": true,
                    "method": "RSI",
					"candleSize": data.candleSize,
//					"candleSize": 1,
                    "historySize": 10,
					  talib: {
							enabled: false,
							version: '1.0.2'
					}
                },
//this is just the same as your usual setup in config.js
                "add your strategy here, it's the same name you use in config.js": {
                    "parameters": {
                        "interval": 8,
                        "thresholds": {
				//here we reference the indicator range outputs into the config
				"low": data.rsilong,
				"high": data.rsishort,
				"persistence": 1
			}
                    },
               },
                "backtest": {
//use scan or a daterange by commenting / uncommenting out
					//"daterange": "scan",
                   "daterange": {
                        "from": "2017-07-01 00:00:00",
                        "to": "2017-08-01 00:00:00"
						}
				},
                "performanceAnalyzer": {
                    "riskFreeReturn": 5,
                    "enabled": true
                },
                "valid": true
            },
            "data": {
                "candleProps": ["close", "start"],
                "indicatorResults": true,
                "report": true,
                "roundtrips": true,
                "trades": true
            }

New error:
2017-09-09 12:35:18 (INFO):              Using the strategy: RSI
/home/gekko/strategies/indicators/RSI.js:6
  this.weight = settings.interval;
                        ^

TypeError: Cannot read property 'interval' of undefined
    at new Indicator (/home/gekko/strategies/indicators/RSI.js:6:25)
    at Base.addIndicator (/home/gekko/plugins/tradingAdvisor/baseTradingMethod.js:290:27)
    at Base.bound [as addIndicator] (/home/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Base.method.init (/home/gekko/strategies/RSI.js:34:8)
    at Base.bound [as init] (/home/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Base (/home/gekko/plugins/tradingAdvisor/baseTradingMethod.js:117:8)
    at Actor.setupTradingMethod (/home/gekko/plugins/tradingAdvisor/tradingAdvisor.js:58:17)
    at Actor.bound [as setupTradingMethod] (/home/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Actor (/home/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)
    at load (/home/gekko/core/pluginUtil.js:95:22)
  xxx POST /api/backtest 500 543ms -

  Error: non-error thrown: Child process has died.
      at Object.onerror (/home/gekko/node_modules/koa/lib/context.js:105:40)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

            "add your strategy here, it's the same name you use in config.js": {
                "parameters": {

put your strat name in the first bit:
"add your strategy here, it's the same name you use in config.js": {
Then delete the parameters line and the corresponding closure.

For example:
          "divergeance": {
				  "logging": false,
				  "interval": 25,
				  "historylength": data.historylength,
				  "candleintervallong": data.candleintervallong,
				  "candleintervalshort": data.candleintervalshort,
				  "pricelldiff": data.pricelldiff,
				  "pricehhdiff": data.pricehhdiff
            },

@thegamecat I can't get profit outputs, I've tracked it down to asset getting set as NaN in the performance Analyzer instance, which was probably bled through other plugin's as well. Any idea why this would occur?

ah start with both an asset and currency

@thegamecat
I have the defaults left for that, { ... asset : 1, currency: 100 ...}

Oh god I have no idea then. Maybe worth chucking up some code.

@thegamecat
Very odd, on the first run of a pair, the asset is set correctly and therefore the profit calculations work. However, as soon as a trade is made, the asset becomes NaN, and currency 0. This occurs even if i reset the server. Then, the second time the script is ran, no profits are calculated.
Values in performanceAnalyzer:
On init:
{ asset: 1, currency: 100, balance: 428.11 }
After first position open:
{ asset: NaN, currency: 0, balance: 428.11 }
Which on positon close changes to:
{ asset: 0, currency: NaN, balance: 428.11 }
Here's my config:
`
let outconfig = {
"gekkoConfig": {
"watch": {
"exchange": "gdax",
"currency": "USD",
"asset": "ETH"
},
"paperTrader": {
"fee": 0.25,
"slippage": 0.05,
"feeTaker": 0.25,
"feeUsing": "maker",
"reportInCurrency": true,
"simulationBalance": {
"asset": 1,
"currency": 100
},
"reportRoundtrips": true,
"enabled": true
},
"writer": {
"enabled": false,
"logpath": ""
},
"tradingAdvisor": {
"enabled": true,
"method": "RSI",
"candleSize": data.candleSize,
//					"candleSize": 1,
"historySize": 10,
talib: {
enabled: false,
version: '1.0.2'
}
},
'MACD' : {
                    'short': data.rsishort,
                    'long': data.rsilong,
                    'signal': 9,
                    // the difference between the EMAs (to act as triggers)
                    'thresholds': {
                        'down': -0.025,
                        'up': 0.025,
                        // How many candle intervals should a trend persist
                        // before we consider it real?
                        'persistence': 1
                    }

            },
            'RSI' : {
                interval: 14,
                thresholds: {
                  low: data.rsilow,
                  high: data.rsihigh,
                  // How many candle intervals should a trend persist
                  // before we consider it real?
                  persistence: 1
                }
            },
            "backtest": {

//use scan or a daterange by commenting / uncommenting out
//"daterange": "scan",
"daterange": {
"from": "	2017-09-07 04:00",
"to": "	2017-09-07 19:00"
},
"bactchSize" : 50
			},
            "performanceAnalyzer": {
                "riskFreeReturn": 5,
                "enabled": true
            },
            "valid": true
        },
        "data": {
            "candleProps": ["close", "start"],
            "indicatorResults": true,
            "report": true,
            "roundtrips": true,
            "trades": true
        }
    };

Here's a print-out of the first iteration (calculates profit correctly):
{ trades: [],
candles:
[ { close: 329.92, start: '2017-09-07T04:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T06:00:00.000Z' },
{ close: 330, start: '2017-09-07T08:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T10:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T12:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T14:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T16:00:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: 433.8,
profit: 5.689999999999998,
relativeProfit: 1.3290976618158794,
yearlyProfit: '3322.96000000',
relativeYearlyProfit: '776.19303450',
startPrice: 328.11,
endPrice: 333.8,
trades: 0,
startBalance: 428.11,
sharpe: 0,
alpha: 3.9558254853555184 },
roundtrips: [] }
{ trades: [],
candles:
[ { close: 329.92, start: '2017-09-07T04:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T06:00:00.000Z' },
{ close: 330, start: '2017-09-07T08:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T10:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T12:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T14:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T16:00:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: 433.8,
profit: 5.689999999999998,
relativeProfit: 1.3290976618158794,
yearlyProfit: '3322.96000000',
relativeYearlyProfit: '776.19303450',
startPrice: 328.11,
endPrice: 333.8,
trades: 0,
startBalance: 428.11,
sharpe: 0,
alpha: 3.9558254853555184 },
roundtrips: [] }
{ trades:
[ { action: 'buy',
price: 328.96,
portfolio: [Object],
balance: null,
date: '2017-09-07T06:15:00.000Z' } ],
candles:
[ { close: 327.23, start: '2017-09-07T04:00:00.000Z' },
{ close: 326.7, start: '2017-09-07T04:15:00.000Z' },
{ close: 327.49, start: '2017-09-07T04:30:00.000Z' },
{ close: 327.98, start: '2017-09-07T04:45:00.000Z' },
{ close: 329.52, start: '2017-09-07T05:00:00.000Z' },
{ close: 329.24, start: '2017-09-07T05:15:00.000Z' },
{ close: 329.84, start: '2017-09-07T05:30:00.000Z' },
{ close: 329.92, start: '2017-09-07T05:45:00.000Z' },
{ close: 327.9, start: '2017-09-07T06:00:00.000Z' },
{ close: 328.96, start: '2017-09-07T06:15:00.000Z' },
{ close: 327.16, start: '2017-09-07T06:30:00.000Z' },
{ close: 327.16, start: '2017-09-07T06:45:00.000Z' },
{ close: 325.91, start: '2017-09-07T07:00:00.000Z' },
{ close: 325.2, start: '2017-09-07T07:15:00.000Z' },
{ close: 325.27, start: '2017-09-07T07:30:00.000Z' },
{ close: 324.4, start: '2017-09-07T07:45:00.000Z' },
{ close: 324.11, start: '2017-09-07T08:00:00.000Z' },
{ close: 324.52, start: '2017-09-07T08:15:00.000Z' },
{ close: 324.59, start: '2017-09-07T08:30:00.000Z' },
{ close: 326.83, start: '2017-09-07T08:45:00.000Z' },
{ close: 326.5, start: '2017-09-07T09:00:00.000Z' },
{ close: 328.72, start: '2017-09-07T09:15:00.000Z' },
{ close: 330, start: '2017-09-07T09:30:00.000Z' },
{ close: 330, start: '2017-09-07T09:45:00.000Z' },
{ close: 330.76, start: '2017-09-07T10:00:00.000Z' },
{ close: 329.46, start: '2017-09-07T10:15:00.000Z' },
{ close: 328.84, start: '2017-09-07T10:30:00.000Z' },
{ close: 329.55, start: '2017-09-07T10:45:00.000Z' },
{ close: 329.33, start: '2017-09-07T11:00:00.000Z' },
{ close: 332.42, start: '2017-09-07T11:15:00.000Z' },
{ close: 330.51, start: '2017-09-07T11:30:00.000Z' },
{ close: 331.75, start: '2017-09-07T11:45:00.000Z' },
{ close: 331.72, start: '2017-09-07T12:00:00.000Z' },
{ close: 330.92, start: '2017-09-07T12:15:00.000Z' },
{ close: 331.4, start: '2017-09-07T12:30:00.000Z' },
{ close: 334.99, start: '2017-09-07T12:45:00.000Z' },
{ close: 334.96, start: '2017-09-07T13:00:00.000Z' },
{ close: 335.02, start: '2017-09-07T13:15:00.000Z' },
{ close: 334.91, start: '2017-09-07T13:30:00.000Z' },
{ close: 335.87, start: '2017-09-07T13:45:00.000Z' },
{ close: 335.57, start: '2017-09-07T14:00:00.000Z' },
{ close: 334.77, start: '2017-09-07T14:15:00.000Z' },
{ close: 335.98, start: '2017-09-07T14:30:00.000Z' },
{ close: 335.4, start: '2017-09-07T14:45:00.000Z' },
{ close: 335.5, start: '2017-09-07T15:00:00.000Z' },
{ close: 335.99, start: '2017-09-07T15:15:00.000Z' },
{ close: 337.4, start: '2017-09-07T15:30:00.000Z' },
{ close: 336.8, start: '2017-09-07T15:45:00.000Z' },
{ close: 338.31, start: '2017-09-07T16:00:00.000Z' },
{ close: 337.43, start: '2017-09-07T16:15:00.000Z' },
{ close: 337.34, start: '2017-09-07T16:30:00.000Z' },
{ close: 335.51, start: '2017-09-07T16:45:00.000Z' },
{ close: 333.1, start: '2017-09-07T17:00:00.000Z' },
{ close: 333.19, start: '2017-09-07T17:15:00.000Z' },
{ close: 333.34, start: '2017-09-07T17:30:00.000Z' },
{ close: 333.44, start: '2017-09-07T17:45:00.000Z' },
{ close: 333.71, start: '2017-09-07T18:00:00.000Z' },
{ close: 333.54, start: '2017-09-07T18:15:00.000Z' },
{ close: 333.14, start: '2017-09-07T18:30:00.000Z' },
{ close: 333.8, start: '2017-09-07T18:45:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: null,
profit: null,
relativeProfit: null,
yearlyProfit: 'NaN',
relativeYearlyProfit: 'NaN',
startPrice: 328.11,
endPrice: 333.8,
trades: 1,
startBalance: 428.11,
sharpe: 0,
alpha: null },
roundtrips: [] }
Epoch number: 50
Time it took (seconds): 1.152
Max profit: 5.689999999999998$ max profit position: 0
Max parametars:
{ rsihigh: 73, rsilow: 17, candleSize: 120 }
Other metrics:
{ balance: 433.8,
profit: 5.689999999999998,
relativeProfit: 1.3290976618158794,
yearlyProfit: '3322.96000000',
relativeYearlyProfit: '776.19303450',
startPrice: 328.11,
endPrice: 333.8,
trades: 0 }
Global maximum: 5.689999999999998$, parameters:
{ rsihigh: 73, rsilow: 17, candleSize: 120 }
Other metrics of global maximum:
Global maximum so far:
{ balance: 433.8,
profit: 5.689999999999998,
relativeProfit: 1.3290976618158794,
yearlyProfit: '3322.96000000',
relativeYearlyProfit: '776.19303450',
startPrice: 328.11,
endPrice: 333.8,
trades: 0 }
`
and here's an output on a second script run, where it doesn't:
`
{ trades:
[ { action: 'buy',
price: 326.83,
portfolio: [Object],
balance: null,
date: '2017-09-07T08:30:00.000Z' } ],
candles:
[ { close: 326.7, start: '2017-09-07T04:00:00.000Z' },
{ close: 327.98, start: '2017-09-07T04:30:00.000Z' },
{ close: 329.24, start: '2017-09-07T05:00:00.000Z' },
{ close: 329.92, start: '2017-09-07T05:30:00.000Z' },
{ close: 328.96, start: '2017-09-07T06:00:00.000Z' },
{ close: 327.16, start: '2017-09-07T06:30:00.000Z' },
{ close: 325.2, start: '2017-09-07T07:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T07:30:00.000Z' },
{ close: 324.52, start: '2017-09-07T08:00:00.000Z' },
{ close: 326.83, start: '2017-09-07T08:30:00.000Z' },
{ close: 328.72, start: '2017-09-07T09:00:00.000Z' },
{ close: 330, start: '2017-09-07T09:30:00.000Z' },
{ close: 329.46, start: '2017-09-07T10:00:00.000Z' },
{ close: 329.55, start: '2017-09-07T10:30:00.000Z' },
{ close: 332.42, start: '2017-09-07T11:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T11:30:00.000Z' },
{ close: 330.92, start: '2017-09-07T12:00:00.000Z' },
{ close: 334.99, start: '2017-09-07T12:30:00.000Z' },
{ close: 335.02, start: '2017-09-07T13:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T13:30:00.000Z' },
{ close: 334.77, start: '2017-09-07T14:00:00.000Z' },
{ close: 335.4, start: '2017-09-07T14:30:00.000Z' },
{ close: 335.99, start: '2017-09-07T15:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T15:30:00.000Z' },
{ close: 337.43, start: '2017-09-07T16:00:00.000Z' },
{ close: 335.51, start: '2017-09-07T16:30:00.000Z' },
{ close: 333.19, start: '2017-09-07T17:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T17:30:00.000Z' },
{ close: 333.54, start: '2017-09-07T18:00:00.000Z' },
{ close: 333.8, start: '2017-09-07T18:30:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: null,
profit: null,
relativeProfit: null,
yearlyProfit: 'NaN',
relativeYearlyProfit: 'NaN',
startPrice: 328.11,
endPrice: 333.8,
trades: 1,
startBalance: 428.11,
sharpe: 0,
alpha: null },
roundtrips: [] }
{ trades:
[ { action: 'buy',
price: 326.83,
portfolio: [Object],
balance: null,
date: '2017-09-07T08:30:00.000Z' } ],
candles:
[ { close: 326.7, start: '2017-09-07T04:00:00.000Z' },
{ close: 327.98, start: '2017-09-07T04:30:00.000Z' },
{ close: 329.24, start: '2017-09-07T05:00:00.000Z' },
{ close: 329.92, start: '2017-09-07T05:30:00.000Z' },
{ close: 328.96, start: '2017-09-07T06:00:00.000Z' },
{ close: 327.16, start: '2017-09-07T06:30:00.000Z' },
{ close: 325.2, start: '2017-09-07T07:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T07:30:00.000Z' },
{ close: 324.52, start: '2017-09-07T08:00:00.000Z' },
{ close: 326.83, start: '2017-09-07T08:30:00.000Z' },
{ close: 328.72, start: '2017-09-07T09:00:00.000Z' },
{ close: 330, start: '2017-09-07T09:30:00.000Z' },
{ close: 329.46, start: '2017-09-07T10:00:00.000Z' },
{ close: 329.55, start: '2017-09-07T10:30:00.000Z' },
{ close: 332.42, start: '2017-09-07T11:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T11:30:00.000Z' },
{ close: 330.92, start: '2017-09-07T12:00:00.000Z' },
{ close: 334.99, start: '2017-09-07T12:30:00.000Z' },
{ close: 335.02, start: '2017-09-07T13:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T13:30:00.000Z' },
{ close: 334.77, start: '2017-09-07T14:00:00.000Z' },
{ close: 335.4, start: '2017-09-07T14:30:00.000Z' },
{ close: 335.99, start: '2017-09-07T15:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T15:30:00.000Z' },
{ close: 337.43, start: '2017-09-07T16:00:00.000Z' },
{ close: 335.51, start: '2017-09-07T16:30:00.000Z' },
{ close: 333.19, start: '2017-09-07T17:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T17:30:00.000Z' },
{ close: 333.54, start: '2017-09-07T18:00:00.000Z' },
{ close: 333.8, start: '2017-09-07T18:30:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: null,
profit: null,
relativeProfit: null,
yearlyProfit: 'NaN',
relativeYearlyProfit: 'NaN',
startPrice: 328.11,
endPrice: 333.8,
trades: 1,
startBalance: 428.11,
sharpe: 0,
alpha: null },
roundtrips: [] }
Epoch number: 1
Time it took (seconds): 0.954
Max profit: 0$ max profit position: 0
Max parametars:
{ rsihigh: 74, rsilow: 33, candleSize: 30 }
Other metrics:
{ balance: 0,
profit: 0,
relativeProfit: 0,
yearlyProfit: 0,
relativeYearlyProfit: 0,
startPrice: 328.11,
endPrice: 333.8,
trades: 1 }
Global maximum: 0$, parameters:
{ rsihigh: 74, rsilow: 33, candleSize: 30 }
Other metrics of global maximum:
Global maximum so far:
{ balance: 0,
profit: 0,
relativeProfit: 0,
yearlyProfit: 0,
relativeYearlyProfit: 0,
startPrice: 328.11,
endPrice: 333.8,
trades: 1 }
{ trades:
[ { action: 'buy',
price: 326.83,
portfolio: [Object],
balance: null,
date: '2017-09-07T08:30:00.000Z' } ],
candles:
[ { close: 326.7, start: '2017-09-07T04:00:00.000Z' },
{ close: 327.98, start: '2017-09-07T04:30:00.000Z' },
{ close: 329.24, start: '2017-09-07T05:00:00.000Z' },
{ close: 329.92, start: '2017-09-07T05:30:00.000Z' },
{ close: 328.96, start: '2017-09-07T06:00:00.000Z' },
{ close: 327.16, start: '2017-09-07T06:30:00.000Z' },
{ close: 325.2, start: '2017-09-07T07:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T07:30:00.000Z' },
{ close: 324.52, start: '2017-09-07T08:00:00.000Z' },
{ close: 326.83, start: '2017-09-07T08:30:00.000Z' },
{ close: 328.72, start: '2017-09-07T09:00:00.000Z' },
{ close: 330, start: '2017-09-07T09:30:00.000Z' },
{ close: 329.46, start: '2017-09-07T10:00:00.000Z' },
{ close: 329.55, start: '2017-09-07T10:30:00.000Z' },
{ close: 332.42, start: '2017-09-07T11:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T11:30:00.000Z' },
{ close: 330.92, start: '2017-09-07T12:00:00.000Z' },
{ close: 334.99, start: '2017-09-07T12:30:00.000Z' },
{ close: 335.02, start: '2017-09-07T13:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T13:30:00.000Z' },
{ close: 334.77, start: '2017-09-07T14:00:00.000Z' },
{ close: 335.4, start: '2017-09-07T14:30:00.000Z' },
{ close: 335.99, start: '2017-09-07T15:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T15:30:00.000Z' },
{ close: 337.43, start: '2017-09-07T16:00:00.000Z' },
{ close: 335.51, start: '2017-09-07T16:30:00.000Z' },
{ close: 333.19, start: '2017-09-07T17:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T17:30:00.000Z' },
{ close: 333.54, start: '2017-09-07T18:00:00.000Z' },
{ close: 333.8, start: '2017-09-07T18:30:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: null,
profit: null,
relativeProfit: null,
yearlyProfit: 'NaN',
relativeYearlyProfit: 'NaN',
startPrice: 328.11,
endPrice: 333.8,
trades: 1,
startBalance: 428.11,
sharpe: 0,
alpha: null },
roundtrips: [] }
{ trades: [],
candles:
[ { close: 329.92, start: '2017-09-07T04:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T06:00:00.000Z' },
{ close: 330, start: '2017-09-07T08:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T10:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T12:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T14:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T16:00:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: 433.8,
profit: 5.689999999999998,
relativeProfit: 1.3290976618158794,
yearlyProfit: '3322.96000000',
relativeYearlyProfit: '776.19303450',
startPrice: 328.11,
endPrice: 333.8,
trades: 0,
startBalance: 428.11,
sharpe: 0,
alpha: 3.9558254853555184 },
roundtrips: [] }
{ trades:
[ { action: 'buy',
price: 326.83,
portfolio: [Object],
balance: null,
date: '2017-09-07T08:30:00.000Z' } ],
candles:
[ { close: 326.7, start: '2017-09-07T04:00:00.000Z' },
{ close: 327.98, start: '2017-09-07T04:30:00.000Z' },
{ close: 329.24, start: '2017-09-07T05:00:00.000Z' },
{ close: 329.92, start: '2017-09-07T05:30:00.000Z' },
{ close: 328.96, start: '2017-09-07T06:00:00.000Z' },
{ close: 327.16, start: '2017-09-07T06:30:00.000Z' },
{ close: 325.2, start: '2017-09-07T07:00:00.000Z' },
{ close: 324.4, start: '2017-09-07T07:30:00.000Z' },
{ close: 324.52, start: '2017-09-07T08:00:00.000Z' },
{ close: 326.83, start: '2017-09-07T08:30:00.000Z' },
{ close: 328.72, start: '2017-09-07T09:00:00.000Z' },
{ close: 330, start: '2017-09-07T09:30:00.000Z' },
{ close: 329.46, start: '2017-09-07T10:00:00.000Z' },
{ close: 329.55, start: '2017-09-07T10:30:00.000Z' },
{ close: 332.42, start: '2017-09-07T11:00:00.000Z' },
{ close: 331.75, start: '2017-09-07T11:30:00.000Z' },
{ close: 330.92, start: '2017-09-07T12:00:00.000Z' },
{ close: 334.99, start: '2017-09-07T12:30:00.000Z' },
{ close: 335.02, start: '2017-09-07T13:00:00.000Z' },
{ close: 335.87, start: '2017-09-07T13:30:00.000Z' },
{ close: 334.77, start: '2017-09-07T14:00:00.000Z' },
{ close: 335.4, start: '2017-09-07T14:30:00.000Z' },
{ close: 335.99, start: '2017-09-07T15:00:00.000Z' },
{ close: 336.8, start: '2017-09-07T15:30:00.000Z' },
{ close: 337.43, start: '2017-09-07T16:00:00.000Z' },
{ close: 335.51, start: '2017-09-07T16:30:00.000Z' },
{ close: 333.19, start: '2017-09-07T17:00:00.000Z' },
{ close: 333.44, start: '2017-09-07T17:30:00.000Z' },
{ close: 333.54, start: '2017-09-07T18:00:00.000Z' },
{ close: 333.8, start: '2017-09-07T18:30:00.000Z' } ],
report:
{ currency: 'USD',
asset: 'ETH',
startTime: '2017-09-07 04:00:00',
endTime: '2017-09-07 19:00:00',
timespan: '15 hours',
market: 1.7341745146444794,
balance: null,
profit: null,
relativeProfit: null,
yearlyProfit: 'NaN',
relativeYearlyProfit: 'NaN',
startPrice: 328.11,
endPrice: 333.8,
trades: 1,
startBalance: 428.11,
sharpe: 0,
alpha: null },
roundtrips: [] }
Epoch number: 2
Time it took (seconds): 1.108
Max profit: 0$ max profit position: 0
Max parametars:
{ rsihigh: 89, rsilow: 33, candleSize: 30 }
Other metrics:
{ balance: 0,
profit: 0,
relativeProfit: 0,
yearlyProfit: 0,
relativeYearlyProfit: 0,
startPrice: 328.11,
endPrice: 333.8,
trades: 1 }
Global maximum: 0$, parameters:
{ rsihigh: 89, rsilow: 33, candleSize: 30 }
Other metrics of global maximum:
Global maximum so far:
{ balance: 0,
profit: 0,
relativeProfit: 0,
yearlyProfit: 0,
relativeYearlyProfit: 0,
startPrice: 328.11,
endPrice: 333.8,
trades: 1 }
`

Ok I'm not sure from that, can you try a month ? I don't know if you'll learn much from 12 hours (I'm happy to be wrong though).

Sure, here's the output from running a test over a month period:

{ trades:
   [ { action: 'buy',
       price: 0.09239999,
       portfolio: [Object],
       balance: null,
       date: '2017-06-07T06:16:00.000Z' },
     { action: 'sell',
       price: 0.1493028,
       portfolio: [Object],
       balance: null,
       date: '2017-06-12T22:16:00.000Z' },
     { action: 'buy',
       price: 0.12793296,
       portfolio: [Object],
       balance: null,
       date: '2017-06-20T14:16:00.000Z' } ],
  candles:
   [ { close: 0.09248966, start: '2017-06-05T18:16:00.000Z' },
     { close: 0.08870465, start: '2017-06-05T22:16:00.000Z' },
     { close: 0.08980017, start: '2017-06-06T02:16:00.000Z' },
     { close: 0.08999998, start: '2017-06-06T06:16:00.000Z' },
     { close: 0.092, start: '2017-06-06T10:16:00.000Z' }
     ... all of the items ],
  report:
   { currency: 'BTC',
     asset: 'ETH',
     startTime: '2017-06-05 18:16:00',
     endTime: '2017-07-03 02:16:00',
     timespan: 'a month',
     market: 17.391316796534127,
     balance: null,
     profit: null,
     relativeProfit: null,
     yearlyProfit: 'NaN',
     relativeYearlyProfit: 'NaN',
     startPrice: 0.09429999,
     endPrice: 0.1107,
     trades: 3,
     startBalance:<PHONE_NUMBER>9,
     sharpe: null,
     alpha: null },
  roundtrips:
   [ { entryAt: '2017-06-07T06:16:00.000Z',
       entryPrice: 0.09239999,
       entryBalance: null,
       exitAt: '2017-06-12T22:16:00.000Z',
       exitPrice: 0.1464,
       exitBalance: null,
       duration: 489600000,
       pnl: null,
       profit: null } ] }

I really have no idea, not seen that before :(

@thegamecat - thanks! I'm clearly dumb when it comes to debugging or understanding comments lol

@thegamecat
I've tracked it down to an error in paperTrader.js when initalizing this.fee:
this.fee = 1 - (calcConfig['fee' + calcConfig.feeUsing.charAt(0).toUpperCase() + calcConfig.feeUsing.slice(1)] + calcConfig.slippage) / 100;

The problem is of course, that the config parameter required.. was not set. Sorry for all the confusion for my silly problem. I've only recently started looking at this codebase and didn't understand the significance of the feeUsing parameter.
Upward and onward !
P.s.
After I integrate my own strats into this, I may implement a UI for it. How would I approach contributing to this with you?

Thats brilliant thanks @mnoseworthy - I've updated the file.
Also the GA is now on github again in this repo: https://github.com/thegamecat/gekko-trading-stuff
Just contact me on the discord group - I'm .zuki! @ https://discord.gg/Ws3M2A

I let it run for awhile, then went back to look at terminal2:
Global maximum: 0$, parameters:
{ rsishort: 62, rsilong: 29, candleSize: 1440 }
Other metrics of global maximum:
Global maximum so far:
{ balance: null,
  profit: null,
  relativeProfit: null,
  yearlyProfit: 'NaN',
  relativeYearlyProfit: 'NaN',
  startPrice: 0.01605,
  endPrice: 0.01479,
  trades: 1 }
--------------------------------------------------------------
{ Error: socket hang up
    at createHangUpError (_http_client.js:345:15)
    at Socket.socketOnEnd (_http_client.js:437:23)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1059:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) code: 'ECONNRESET' }
/home/arbitrage/gekko2/run-ga-parallel.js:229
                                        let report = body.report;
                                                         ^

TypeError: Cannot read property 'report' of undefined
    at Request._callback (/home/arbitrage/gekko2/run-ga-parallel.js:229:23)
    at self.callback (/home/arbitrage/gekko2/node_modules/request/request.js:188:22)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at Request.onRequestError (/home/arbitrage/gekko2/node_modules/request/request.js:884:8)
    at emitOne (events.js:115:13)
    at ClientRequest.emit (events.js:210:7)
    at Socket.socketOnEnd (_http_client.js:437:9)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)

What OS are you using?

is that candlesize bigger than your test period?

@imkane
This is due to a too short time interval for your date range

@mnoseworthy  do you have discord btw?

@thegamecat I don't actually :( It's for Voice chat right?

@thegamecat:
CentOS 7
I'm not sure how to tell about the candlesize vs my test period. I left the same candlesize setup as your original code, and:
"daterange": {
                        "from": "2017-07-01 00:00:00",
                        "to": "2017-08-01 00:00:00"
			}

@mnoseworthy Do you think 1 month is too short?

get it :)
it's voice and text chat

1month is fine - i usually run way more.

Maybe a dumb Q, but how do we know what B&H / market was from this output?
Global maximum: 20.55338325999999$, parameters:
21|ga2     | { rsishort: 85, rsilong: 21, candleSize: 60 }
21|ga2     | Other metrics of global maximum:
21|ga2     | Global maximum so far:
21|ga2     | { balance:<PHONE_NUMBER>6,
21|ga2     |   profit: 20.55338325999999,
21|ga2     |   relativeProfit: 20.550084971362082,
21|ga2     |   yearlyProfit: '241.99951258',
21|ga2     |   relativeYearlyProfit: '241.96067789',
21|ga2     |   startPrice: 0.01605,
21|ga2     |   endPrice: 0.01479,
21|ga2     |   trades: 6 }

Also, when I plug these same params into a backtest in the UI, I get COMPLETELY different results, everything from # of trades to profit (I get a loss in the UI).

I'm getting almost exactly the same error as imkane:
`2017-09-10 21:56:33 (INFO):     Setting up Gekko in backtest mode
2017-09-10 21:56:33 (INFO):
2017-09-10 21:56:33 (INFO):     Setting up:
2017-09-10 21:56:33 (INFO):              Trading Advisor
2017-09-10 21:56:33 (INFO):              Calculate trading advice
xxx POST /api/backtest 500 200ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/home/nils/gekko/node_modules/koa/lib/context.js:105:40)
at process._tickCallback (internal/process/next_tick.js:109:7)
`altough his says next_tick.js:188:7
The strategy I have set in run-ga-parallel is: '                "rsi": {
"parameters": {
"interval": 8,
"thresholds": {
//here we reference the indicator range outputs into$
"low": data.rsilong,
"high": data.rsishort,
"persistence": 1
}
},
},
'

I think this should fix it for ya :)  Removed "parameters".
 "rsi": {
                        "interval": 8,
                        "thresholds": {
                                //here we reference the indicator range outputs into$
                                "low": data.rsilong,
                                "high": data.rsishort,
                                "persistence": 1
                        }
               },

Hmm, I came to the same conclusion, but even after pasting your exact strategy it's still not working...

Maybe try:
"feeUsing": "maker",
And make sure your "daterange" code has the correct # of opening/closing brackets.

Which version of Gekko are you running?

@imkane I don't know what you mean with that line, what is there to try with it?
"daterange" is set correctly though
@thegamecat I am running the latest version. Tried both on a Raspberry Pi and on a pc running Ubuntu server

there should be a feeUsing line in the configGekko section

Yes:
                "paperTrader": {
                    "fee": 0.25,
                    "slippage": 0.05,
                    "feeTaker": 0.25,
                    "feeUsing": "maker",
                                        "reportInCurrency": true,
                                        "simulationBalance": {
                        "asset": 1,
                        "currency": 100
                    },
                    "reportRoundtrips": true,
                    "enabled": true
                },

Do I need to edit something here? everything is left default

Hrm take out the reportIncurrency line....that might work.

Nope, commenting out or setting it false has no effect. I'm at a loss here, both Gekko and the GA are near default, I followed the steps required to get Gekko working and to get the GA working, as well as adding the right strategy in the GA. What could I have done wrong?

I figured what I did wrong. I missed the following section:
                "tradingAdvisor": {
                    "enabled": true,
                    "method": "RSI",

It was still on test_method_2 or something.
However, I keep getting null and NaN results, just as @mnoseworthy was having.

ah he fixed that um, in the other thread....

Can someone paste some good strategy settings found by this algorithm, or any other that uses GA or Bayesian Optimization?

Hey @mnoseworthy  and @thegamecat .
Im on gekko 0.57 stable (windows) and have also run into the issue of NaN profit reporting.
As soon as gekko executes one trade, profits become NaN.
If no trades have been executed (I just caused this by a short time range) profits report fine.
Could you walk me through how you solved this? (if at all? : ) )
Heres a simple config with some random values, but i do not think it is the issue.
//run server.js with the following command:

//node --max-old-space-size=8192 server.js

// then run this to run the GA

// node run-ga-parallel.js

const async = require('async');
const randomExt = require('random-ext');
const request = require('request');

// Creates a random gene if prop='all', creates one random property otherwise
function create_gene(prop) {
    let candle_values = [5,10,15,240];
    let properites = {
//here add the indicators and the ranges you want to handle
//in this case my strategy wants to test RSI ranges
		demashort: randomExt.integer(30,10),
		demalong: randomExt.integer(60, 20),
        treshold: randomExt.float(0.01,1),
        "candleSize": candle_values[randomExt.integer(3,0)],
    };
//	console.log(properites);
    if (prop === 'all')
        return properites;
    else {
        return properites[prop];
    }

}

// Creates random population from genes
function create_population(amount) {
    let population = [];

    for (let i = 0; i < amount; i++) {
        population.push(create_gene('all'));
    }

    return population;
}

// Pairs two parents returning two new childs
function crossover(a, b) {
    let len = Object.keys(a).length;
    let cross_point = randomExt.integer(len - 1, 1);
    let tmp_a = {};
    let tmp_b = {};
    let curr_point = 0;
    for (let i in a) {
        if (a.hasOwnProperty(i) && b.hasOwnProperty(i)) {
            if (curr_point < cross_point) {
                tmp_a[i] = a[i];
                tmp_b[i] = b[i];
            }
            else {
                tmp_a[i] = b[i];
                tmp_b[i] = a[i];
            }
        }
        curr_point++;
    }

    return [tmp_a, tmp_b];
}

// Mutates object a at most maxAmount times
function mutate(a, maxAmount) {
    let amt = randomExt.integer(maxAmount, 0);
    let all_props = Object.keys(a);

    let tmp = {};

    for (let p in a) {
        if (a.hasOwnProperty(p))
            tmp[p] = a[p];
    }

    for (let i = 0; i < amt; i++) {
        let position = randomExt.integer(0, a.length);
        let prop = all_props[position];
        tmp[prop] = create_gene(prop);
    }

    return tmp;
}

// For the given population and fitness, returns new population and max score
function run_epoch(population, variation, population_amt, mutate_elements, fitness_arr) {
    let selection_prob = [];
    let fitness_sum = 0;
    let max_fitness = [0, 0];

    for (let i = 0; i < population_amt; i++) {
        if (fitness_arr[i] > max_fitness[0])
            max_fitness = [fitness_arr[i], i];
        fitness_sum += fitness_arr[i];
    }
    if (fitness_sum === 0) {
        for (let j = 0; j < population_amt; j++) {
            selection_prob[j] = 1 / population_amt;
        }
    }
    else {
        for (let j = 0; j < population_amt; j++) {
            selection_prob[j] = fitness_arr[j] / fitness_sum;
        }
    }
    let new_population = [];

    while (new_population.length < population_amt * (1 - variation)) {
        let a, b;
        let selected_prob = randomExt.float(1, 0);
        for (let k = 0; k < population_amt; k++) {
            selected_prob -= selection_prob[k];
            if (selected_prob <= 0) {
                a = population[k];
                break;
            }
        }
        selected_prob = randomExt.float(1, 0);
        for (k = 0; k < population_amt; k++) {
            selected_prob -= selection_prob[k];
            if (selected_prob <= 0) {
                b = population[k];
                break;
            }
        }
        let res = crossover(mutate(a, mutate_elements), mutate(b, mutate_elements));
        new_population.push(res[0]);
        new_population.push(res[1]);
    }

    for (let l = 0; l < population_amt * variation; l++) {
        new_population.push(create_gene('all'));
    }

    return [new_population, max_fitness];
}

// Calls api for every element in test_series and returns gain for each
function fitness_api(tests_series, callback) {
    const number_of_parallel_queries = 8;
    async.mapLimit(tests_series, number_of_parallel_queries, function (data, callback) {
        let outconfig = {
            "gekkoConfig": {
                "watch": {
                    "exchange": "poloniex",
                    "currency": "USDT",
                    "asset": "BTC"
                },
                "paperTrader": {
                    "fee": 0.25,
                    "slippage": 0.05,
                    "feeTaker": 0.25,
                    "feeUsing": "maker",
					"reportInCurrency": true,
					"simulationBalance": {
                        "asset": 1,
                        "currency": 100
                    },
                    "reportRoundtrips": true,
                    "enabled": true
                },
				"writer": {
					"enabled": true,
					//"logpath": "logs/test"
				},
                "tradingAdvisor": {
                    "enabled": true,
                    "method": "DEMA",
					"candleSize": data.candleSize,
//					"candleSize": 1,
                    "historySize": 240,
					  talib: {
							enabled: false,
							version: '1.0.2'
					}
                },
//this is just the same as your usual setup in config.js
			   "DEMA":{
  // EMA weight (α)
  // the higher the weight, the more smooth (and delayed) the line
  short: data.demashort,
  long: data.demalong,
  // amount of candles to remember and base initial EMAs on
  // the difference between the EMAs (to act as triggers)
  thresholds: {
    down: -data.treshold,
    up: data.treshold
  }
},
                "backtest": {
//use scan or a daterange by commenting / uncommenting out
/*					"daterange": "scan",
*/
                   "daterange": {
                        "from": "2017-08-14 19:21",
                        "to": "2017-08-28 19:21"

						}

				},
                "performanceAnalyzer": {
                    "riskFreeReturn": 5,
                    "enabled": true
                },
                "valid": true
            },
            "data": {
                "candleProps": ["close", "start"],
                "indicatorResults": true,
                "report": true,
                "roundtrips": true,
                "trades": true
            }
        };

        request.post({
                url: 'http://localhost:3000/api/backtest',
                json: outconfig,
				headers: {
					"Content-Type": "application/json"
				}
            },
            function (err, httpResponse, body) {
                if (err)
                    console.log(err);

                // These properties will be outputted every epoch, remove property if not needed
                let properties = ['balance', 'profit', 'relativeProfit', 'yearlyProfit', 'relativeYearlyProfit', 'startPrice', 'endPrice', 'trades'];
				if(body===false){
				}

					let report = body.report;
					let result = {"profit": 0, "metrics": false};
					if (report) {
						let picked = properties.reduce(function (o, k) {
							o[k] = report[k];
							return o;
						}, {});
						result = {"profit": body.report.profit, "metrics": picked};
					}

                return callback(err, result);
            });
    }, function (err, results) {
        let profits = [];
        let other_metrics = [];
        for (let i in results) {
            if (results.hasOwnProperty(i)) {
                profits.push(results[i]["profit"]);
                other_metrics.push(results[i]["metrics"])
            }
        }
        callback(profits, other_metrics);
    });
}
// ********************************************************************
// Configurable parameters
// --------------------------------------------------------------------
// How many completely new units will be added to the population
const variation = 0.3; // Population * variation must be a whole number!!

// Population size, better reduce this for larger data
const population_amt = 8;

// How many components maximum to mutate at once
const mutate_elements = 14;

// When the algorithm reaches this value it will stop,
// but you can stop it any time you wish since the last max parameters are outputted every epoch
const target_value =<PHONE_NUMBER>;
// --------------------------------------------------------------------

let population = create_population(population_amt);
let population_fitness;
let other_population_metrics;
let epoch_number = 0;
console.log("Starting training with: " + population_amt + " units");
let start_time = new Date().getTime();

let all_time_maximum = {parameters: {}, gain: 0, epoch_number: 0, other_metrics: {}};

async.doWhilst(function (callback) {
    start_time = new Date().getTime();
    fitness_api(population, function (result, other_metrics) {
        population_fitness = result;
        other_population_metrics = other_metrics;
        callback();
    })

}, function () {

    let end_time = new Date().getTime();
    epoch_number++;
    let results = run_epoch(population, variation, population_amt, mutate_elements, population_fitness);

    let new_population = results[0];

    let max_result = results[1];
    let value = max_result[0];
    let position = max_result[1];

    if (value >= all_time_maximum.gain) {
        all_time_maximum.parameters = population[position];
        all_time_maximum.other_metrics = other_population_metrics[position];
        all_time_maximum.gain = value;
        all_time_maximum.epoch_number = epoch_number;
    }
    console.log("--------------------------------------------------------------");
    console.log("Epoch number: " + epoch_number);
    console.log("Time it took (seconds): " + (end_time - start_time) / 1000);
    console.log("Max profit: " + value + "$" + " max profit position: " + position);
   console.log("Max parametars: ");
   console.log(population[position]);
    console.log("Other metrics: "); // Prints other metrics, they can be turned off on line 190
    console.log(other_population_metrics[position]);

    // Prints out the whole population with its fitness,
    // useful for finding properties that make no sense and debugging
    // for (let element in population) {
    //     console.log("Fitness: "+population_fitness[element]+" Properties:");
    //     console.log(population[element])
    // }

    console.log("--------------------------------------------------------------");
    console.log("Global maximum: " + all_time_maximum.gain + "$, parameters:");
   console.log(all_time_maximum.parameters);
    console.log("Other metrics of global maximum:");
    console.log("Global maximum so far:");
    console.log(all_time_maximum.other_metrics);
    console.log("--------------------------------------------------------------");

    population = new_population;

    return value < target_value;
}, function () {
    console.log("Finished!");
    console.log("All time maximum:");
    console.log(all_time_maximum)
});

@jxxxst quick question: do you also see this when using the UI?

@askmike things are fine in UI and backtesting via commandline.

Hi,
maybe you can have a look:
`--------------------------------------------------------------
Global maximum: 0$, parameters:
{ rsishort: 74, rsilong: 37, candleSize: 1440 }
Other metrics of global maximum:
Global maximum so far:
false

Epoch number: 2
Time it took (seconds): 25.45
Max profit: 0$ max profit position: 0
Max parametars:
{ rsishort: 74, rsilong: 37, candleSize: 1440 }
Other metrics:
false
Global maximum: 0$, parameters:
{ rsishort: 74, rsilong: 37, candleSize: 1440 }
Other metrics of global maximum:
Global maximum so far:
false

Epoch number: 3
Time it took (seconds): 9.318
Max profit: 0$ max profit position: 0
Max parametars:
{ rsishort: 72, rsilong: 32, candleSize: 120 }
Other metrics:
false
Global maximum: 0$, parameters:
{ rsishort: 72, rsilong: 32, candleSize: 120 }
Other metrics of global maximum:
Global maximum so far:
false

Epoch number: 4
Time it took (seconds): 8.66
Max profit: 0$ max profit position: 0
Max parametars:
{ rsishort: 86, rsilong: 38, candleSize: 120 }
Other metrics:
false
Global maximum: 0$, parameters:
{ rsishort: 86, rsilong: 38, candleSize: 120 }
Other metrics of global maximum:
Global maximum so far:
false

Epoch number: 5
Time it took (seconds): 8.95
Max profit: 0$ max profit position: 0
Max parametars:
{ rsishort: 80, rsilong: 14, candleSize: 120 }
Other metrics:
false
Global maximum: 0$, parameters:
{ rsishort: 80, rsilong: 14, candleSize: 120 }
Other metrics of global maximum:
Global maximum so far:
false

Epoch number: 6
Time it took (seconds): 9.183
Max profit: 0$ max profit position: 0
Max parametars:
{ rsishort: 64, rsilong: 17, candleSize: 120 }
Other metrics:
false
Global maximum: 0$, parameters:
{ rsishort: 64, rsilong: 17, candleSize: 120 }
Other metrics of global maximum:
Global maximum so far:
false

Epoch number: 7
Time it took (seconds): 39.166
Max profit: 0$ max profit position: 0
Max parametars:
{ rsishort: 78, rsilong: 22, candleSize: 120 }
Other metrics:
false
Global maximum: 0$, parameters:
{ rsishort: 78, rsilong: 22, candleSize: 120 }
Other metrics of global maximum:
Global maximum so far:
false`
I am getting only zero values and I do not know why.
For testing purposes, I added the DEMA from above
`"gekkoConfig": {
"watch": {
"exchange": "poloniex",
"currency": "USDT",
"asset": "ETH"
},
"paperTrader": {
"fee": 0.25,
"slippage": 0.05,
"feeTaker": 0.25,
"feeUsing": "maker",
"reportInCurrency": true,
"simulationBalance": {
"asset": 1,
"currency": 100
},
"reportRoundtrips": true,
"enabled": true
},
"writer": {
"enabled": false,
"logpath": ""
},
"tradingAdvisor": {
"enabled": true,
"method": "DEMA",
"candleSize": data.candleSize,
//                                      "candleSize": 1,
"historySize": 10,
talib: {
enabled: false,
version: '1.0.2'
}
},
"DEMA":{
// EMA weight (α)
// the higher the weight, the more smooth (and delayed) the line
short: data.demashort,
long: data.demalong,
// amount of candles to remember and base initial EMAs on
// the difference between the EMAs (to act as triggers)
thresholds: {
down: -data.treshold,
up: data.treshold
}
//},
},
"backtest": {
//use scan or a daterange by commenting / uncommenting out
"daterange": "scan",
"daterange": {
"from": "2017-05-04 00:00:00",
"to": "2017-09-28 00:00:00"
}
                            },`

@jxxxst @askmike @thegamecat The issue with the NaN and undefined values for profit is due to the use of "fee" in the paperTrade, change this to "feeMaker" and it should work.

Thanks, I'll update this.

@cmroche thanks alot, i finally got it working !

//run server.js with the following command:
//node --max-old-space-size=8192 server.js
// then run this to run the GA
// node run-ga-parallel.js
const async = require('async');
const randomExt = require('random-ext');
const request = require('request');
// Creates a random gene if prop='all', creates one random property otherwise
function create_gene(prop) {
let candle_values = [120,1440,240,120,2,1,15,30,60];
let properites = {
//here add the indicators and the ranges you want to handle
//in this case my strategy wants to test RSI ranges
rsishort: randomExt.integer(90,60),
rsilong: randomExt.integer(40, 10),
"candleSize": candle_values[randomExt.integer(8,0)],
};
//	console.log(properites);
if (prop === 'all')
return properites;
else {
return properites[prop];
}
}
// Creates random population from genes
function create_population(amount) {
let population = [];
for (let i = 0; i < amount; i++) {
    population.push(create_gene('all'));
}

return population;

}
// Pairs two parents returning two new childs
function crossover(a, b) {
let len = Object.keys(a).length;
let cross_point = randomExt.integer(len - 1, 1);
let tmp_a = {};
let tmp_b = {};
let curr_point = 0;
for (let i in a) {
if (a.hasOwnProperty(i) && b.hasOwnProperty(i)) {
if (curr_point < cross_point) {
tmp_a[i] = a[i];
tmp_b[i] = b[i];
}
else {
tmp_a[i] = b[i];
tmp_b[i] = a[i];
}
}
curr_point++;
}
return [tmp_a, tmp_b];

}
// Mutates object a at most maxAmount times
function mutate(a, maxAmount) {
let amt = randomExt.integer(maxAmount, 0);
let all_props = Object.keys(a);
let tmp = {};

for (let p in a) {
    if (a.hasOwnProperty(p))
        tmp[p] = a[p];
}

for (let i = 0; i < amt; i++) {
    let position = randomExt.integer(0, a.length);
    let prop = all_props[position];
    tmp[prop] = create_gene(prop);
}

return tmp;

}
// For the given population and fitness, returns new population and max score
function run_epoch(population, variation, population_amt, mutate_elements, fitness_arr) {
let selection_prob = [];
let fitness_sum = 0;
let max_fitness = [0, 0];
for (let i = 0; i < population_amt; i++) {
    if (fitness_arr[i] > max_fitness[0])
        max_fitness = [fitness_arr[i], i];
    fitness_sum += fitness_arr[i];
}
if (fitness_sum === 0) {
    for (let j = 0; j < population_amt; j++) {
        selection_prob[j] = 1 / population_amt;
    }
}
else {
    for (let j = 0; j < population_amt; j++) {
        selection_prob[j] = fitness_arr[j] / fitness_sum;
    }
}
let new_population = [];

while (new_population.length < population_amt * (1 - variation)) {
    let a, b;
    let selected_prob = randomExt.float(1, 0);
    for (let k = 0; k < population_amt; k++) {
        selected_prob -= selection_prob[k];
        if (selected_prob <= 0) {
            a = population[k];
            break;
        }
    }
    selected_prob = randomExt.float(1, 0);
    for (k = 0; k < population_amt; k++) {
        selected_prob -= selection_prob[k];
        if (selected_prob <= 0) {
            b = population[k];
            break;
        }
    }
    let res = crossover(mutate(a, mutate_elements), mutate(b, mutate_elements));
    new_population.push(res[0]);
    new_population.push(res[1]);
}

for (let l = 0; l < population_amt * variation; l++) {
    new_population.push(create_gene('all'));
}

return [new_population, max_fitness];

}
// Calls api for every element in test_series and returns gain for each
function fitness_api(tests_series, callback) {
const number_of_parallel_queries = 8;
async.mapLimit(tests_series, number_of_parallel_queries, function (data, callback) {
let outconfig = {
"gekkoConfig": {
"watch": {
"exchange": "poloniex",
"currency": "USDT",
"asset": "LTC"
},
"paperTrader": {
"fee": 0.25,
"slippage": 0.05,
"feeTaker": 0.25,
"feeUsing": "feemaker",
"reportInCurrency": true,
"simulationBalance": {
"asset": 1,
"currency": 100
},
"reportRoundtrips": true,
"enabled": true
},
"writer": {
"enabled": false,
"logpath": ""
},
"tradingAdvisor": {
"enabled": true,
"method": "RSI",
//					"candleSize": data.candleSize,
"candleSize": 60,
"historySize": 10,
talib: {
enabled: false,
version: '1.0.2'
}
},
//this is just the same as your usual setup in config.js
'MACD' : {
                    'short': data.rsishort,
                    'long': data.rsilong,
                    'signal': 9,
                    // the difference between the EMAs (to act as triggers)
                    'thresholds': {
                        'down': -0.025,
                        'up': 0.025,
                        // How many candle intervals should a trend persist
                        // before we consider it real?
                        'persistence': 1
                    }

            },
            'RSI' : {
                interval: 14,
                thresholds: {
                  low: data.rsilow,
                  high: data.rsihigh,
                  // How many candle intervals should a trend persist
                  // before we consider it real?
                  persistence: 1
                }
            },

			'DEMA' : {
				short: data.rsilow,
				long: data.rsihigh,
				thresholds: {
					down: -0.025,
					up: 0.025
				}
				},

			'StochRSI' : {
				interval: 3,
				thresholds: {
					low: data.rsilow,
					high: data.rsihigh,
					// How many candle intervals should a trend persist
					// before we consider it real?
					persistence: 3
				}
            },

            "backtest": {

//use scan or a daterange by commenting / uncommenting out
//				"daterange": "scan",
"daterange": {
"from": "2017-09-15 18:53:00",
"to": "2017-09-27 00:53:00"
					}

			},
            "performanceAnalyzer": {
                "riskFreeReturn": 5,
                "enabled": true
            },
            "valid": true
        },
        "data": {
            "candleProps": ["close", "start"],
            "indicatorResults": true,
            "report": true,
            "roundtrips": true,
            "trades": true
        }
    };

    request.post({
            url: 'http://localhost:3000/api/backtest',
            json: outconfig,
			headers: {
				"Content-Type": "application/json"
			}
        },
        function (err, httpResponse, body) {
            if (err)
                console.log(err);

            // These properties will be outputted every epoch, remove property if not needed
            let properties = ['balance', 'profit', 'relativeProfit', 'yearlyProfit', 'relativeYearlyProfit', 'startPrice', 'endPrice', 'trades'];
			if(body===false){
			}

				let report = body.report;
				let result = {"profit": 0, "metrics": false};
				if (report) {
					let picked = properties.reduce(function (o, k) {
						o[k] = report[k];
						return o;
					}, {});
					result = {"profit": body.report.profit, "metrics": picked};
				}

            return callback(err, result);
        });
}, function (err, results) {
    let profits = [];
    let other_metrics = [];
    for (let i in results) {
        if (results.hasOwnProperty(i)) {
            profits.push(results[i]["profit"]);
            other_metrics.push(results[i]["metrics"])
        }
    }
    callback(profits, other_metrics);
});

}
// ********************************************************************
// Configurable parameters
// --------------------------------------------------------------------
// How many completely new units will be added to the population
const variation = 0.3; // Population * variation must be a whole number!!
// Population size, better reduce this for larger data
const population_amt = 8;
// How many components maximum to mutate at once
const mutate_elements = 14;
// When the algorithm reaches this value it will stop,
// but you can stop it any time you wish since the last max parameters are outputted every epoch
const target_value =<PHONE_NUMBER>;
// --------------------------------------------------------------------
let population = create_population(population_amt);
let population_fitness;
let other_population_metrics;
let epoch_number = 0;
console.log("Starting training with: " + population_amt + " units");
let start_time = new Date().getTime();
let all_time_maximum = {parameters: {}, gain: 0, epoch_number: 0, other_metrics: {}};
async.doWhilst(function (callback) {
start_time = new Date().getTime();
fitness_api(population, function (result, other_metrics) {
population_fitness = result;
other_population_metrics = other_metrics;
callback();
})
}, function () {
let end_time = new Date().getTime();
epoch_number++;
let results = run_epoch(population, variation, population_amt, mutate_elements, population_fitness);

let new_population = results[0];

let max_result = results[1];
let value = max_result[0];
let position = max_result[1];

if (value >= all_time_maximum.gain) {
    all_time_maximum.parameters = population[position];
    all_time_maximum.other_metrics = other_population_metrics[position];
    all_time_maximum.gain = value;
    all_time_maximum.epoch_number = epoch_number;
}
console.log("--------------------------------------------------------------");
console.log("Epoch number: " + epoch_number);
console.log("Time it took (seconds): " + (end_time - start_time) / 1000);
console.log("Max profit: " + value + "$" + " max profit position: " + position);

console.log("Max parametars: ");
console.log(population[position]);
console.log("Other metrics: "); // Prints other metrics, they can be turned off on line 190
console.log(other_population_metrics[position]);
// Prints out the whole population with its fitness,
// useful for finding properties that make no sense and debugging
// for (let element in population) {
//     console.log("Fitness: "+population_fitness[element]+" Properties:");
//     console.log(population[element])
// }

console.log("--------------------------------------------------------------");
console.log("Global maximum: " + all_time_maximum.gain + "$, parameters:");

console.log(all_time_maximum.parameters);
console.log("Other metrics of global maximum:");
console.log("Global maximum so far:");
console.log(all_time_maximum.other_metrics);
console.log("--------------------------------------------------------------");
population = new_population;

return value < target_value;

}, function () {
console.log("Finished!");
console.log("All time maximum:");
console.log(all_time_maximum)
});
Trades are 0??

Epoch number: 22
Time it took (seconds): 11.523
Max profit: 1.4771398999999974$ max profit position: 0
Max parametars:
{ rsishort: 88, rsilong: 25, candleSize: 1 }
Other metrics:
{ balance:<PHONE_NUMBER>,
profit: 1.4771398999999974,
relativeProfit: 0.9765633119351662,
yearlyProfit: '47.92498342',
relativeYearlyProfit: '31.68405412',
startPrice: 51.259,
endPrice: 52.7361399,
trades: 0 }
Global maximum: 1.4771398999999974$, parameters:
{ rsishort: 88, rsilong: 25, candleSize: 1 }
Other metrics of global maximum:
Global maximum so far:
{ balance:<PHONE_NUMBER>,
profit: 1.4771398999999974,
relativeProfit: 0.9765633119351662,
yearlyProfit: '47.92498342',
relativeYearlyProfit: '31.68405412',
startPrice: 51.259,
endPrice: 52.7361399,
trades: 0 }

Can someone post strategies found by these GA's?

StochRSI -LTC/USD
interval = 7
[thresholds]
low = 21
high = 82
persistence = 3

Hi guys,  I have gekko installed on windows 10 bash. No problems to create my own strategies, use talib etc.... but I can't make this GA work!
I have this  typical error:
`c2017-10-28 18:28:10 (INFO):    Setting up Gekko in backtest mode
2017-10-28 18:28:10 (INFO):
2017-10-28 18:28:10 (INFO):     Setting up:
2017-10-28 18:28:10 (INFO):              Trading Advisor
2017-10-28 18:28:10 (INFO):              Calculate trading advice
xxx POST /api/backtest 500 292ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/home/fede/gekko/node_modules/koa/lib/context.js:105:40)
at process._tickCallback (internal/process/next_tick.js:109:7)`
and this is the configuration:
`
"gekkoConfig": {
"watch": {
"exchange": "poloniex",
"currency": "USDT",
"asset": "ETH"
},
"paperTrader": {
"feeMaker": 0.25,
"slippage": 0.05,
"feeTaker": 0.25,
"feeUsing": "maker",
"reportInCurrency": true,
"simulationBalance": {
"asset": 1,
"currency": 100
},
"reportRoundtrips": true,
"enabled": true
},
"writer": {
"enabled": false,
"logpath": ""
},
},
"tradingAdvisor": {
"enabled": true,
"method": "RSI",
"candleSize": data.candleSize,
//                                      "candleSize": 1,
"historySize": 10,
talib: {
enabled: false,
version: '1.0.2'
}
},
            'RSI' : {
                interval: 14,
                thresholds: {
                  low: data.rsilow,
                  high: data.rsihigh,
                  // How many candle intervals should a trend persist
                  // before we consider it real?
                  persistence: 1
                }
            },
               "backtest": {

//use scan or a daterange by commenting / uncommenting out
//"daterange": "scan",
"daterange": {
"from": "2017-05-04 00:00:00",
"to": "2017-08-18 00:00:00"
},
"valid": true
},
"data": {
"candleProps": ["close", "start"],
"indicatorResults": true,
"report": true,
"roundtrips": true,
"trades": true
}
};
`
:(

SOLVED!!!!! my bad

@thegamecat I'm having same issues as @imkane. Gekko is randomly crashing (Error: socket hang up) and results are quite different compared with the UI. Any ideas?

I don't but may be worth extending the timeout on the server.js?
As for different results - the GA is hitting the same api as the UI so I can't see how that is possible.

yes! I'd love a PR for that.
On Mon, Oct 30, 2017 at 3:38 PM, thegamecat<EMAIL_ADDRESS>wrote:

I don't but may be worth extending the timeout on the server.js?
As for different results - the GA is hitting the same api as the UI so I
can't see how that is possible.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/1102#issuecomment-340376784, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA7MD2fRbiYhouyP7oUOIA47NUgMFkvdks5sxYsSgaJpZM4PSEz3
.

--
PGP key at keybase.io/mikevanrossum
https://keybase.io/mikevanrossum/key.asc

There are 2 scenarios:
1) Candle size too small compared to history:  Terminal 2 (run-ga-parallel.js), crashes but Terminal 1 (server.js) keeps going.
Using CCI with a fixed candle size of 1 and a datarange from 2017-07-20 00:00:00 to 2017-10-02 00:00:00; It's not even possible to go through a single epoch before it crashes.
2) If I increase the candle size or reduce history, then => Random crash: Termial 1 crashes first (debug messages stop) and then, because of that, Terminal 2 crashes.
Using CCI with a fixed candle size of 5 and a datarange : 2017-07-20 00:00:00 to 2017-10-02 00:00:00. Epoch 5  creashed and I got this results:
--------------------------------------------------------------
Epoch number: 4
Time it took (seconds): 125.048
Max profit:<PHONE_NUMBER>350398$ max profit position: 0
Max parametars:
{ cciDown: -99, cciUP: 81, candleSize: 5 }
Other metrics:
{ balance:<PHONE_NUMBER>350398,
  profit:<PHONE_NUMBER>350398,
  relativeProfit: 54.67324079153889,
  yearlyProfit: '795.53259490',
  relativeYearlyProfit: '269.67206607',
  startPrice: 195,
  endPrice:<PHONE_NUMBER>9,
  trades: 1 }
--------------------------------------------------------------
Global maximum:<PHONE_NUMBER>350398$, parameters:
{ cciDown: -99, cciUP: 81, candleSize: 5 }
Other metrics of global maximum:
Global maximum so far:
{ balance:<PHONE_NUMBER>350398,
  profit:<PHONE_NUMBER>350398,
  relativeProfit: 54.67324079153889,
  yearlyProfit: '795.53259490',
  relativeYearlyProfit: '269.67206607',
  startPrice: 195,
  endPrice:<PHONE_NUMBER>9,
  trades: 1 }
--------------------------------------------------------------

Using the same data with the UI ( cciDown: -99, cciUP: 81, candleSize: 5):

As you can see not even the number of trades are equal. Actually there has to be something wrong here since it ALWAYS make only one trade.
PS: I couldn't find out how to extend the server timeout

I've created a GA discord channel specifically for people doing GA backtesting with Gekko. Here we can share tools, knowledge, tips, tricks etc.. I would also like to maintain a server list for people who are interested in sharing system resources using a round robin system for testing.
gekkoGA


When prefix of Reflections is blank string, cannot find subTypes in whole classpath scope.

Version: 0.9.12.
Problem code: Reflections reflections = new Reflections("");
Description: Must package the program be a jar, this problem will be happened.

Okay, so for anyone also having this issue, I've found a solution.
new Reflections(new ConfigurationBuilder()
    .setScanners() // the scanners you need
    .setUrls(ClasspathHelper.forClass(getClass()))
);

thanks @l4wei and @Kaktushose , it is preferred to use ConfigurationBuilder so that urls are correctly resolved from classpath. I've updated the docs and will update further.


Fix unstable tests

This is hopefully fixing all our unstable tests.
With this PR, we're moving away from light tests, because they're reusing project data between tests. The past has shown that this reuse is making our tests (more) unstable.
For example, services were reused between tests. This made it possible that the state of AppMap CLI processes was leaked into other tests, which expect a clean state.

Supersesed by https://github.com/getappmap/appmap-intellij-plugin/pull/762
If tests are still unstable, we probably need to implement the new test setup proposed by this PR. But atm it's too many changes for uncertain results.


Fixing attach template to show pickProcess by default.

In a code path, template processId is 0 instead of command.pickProcess. Fixing it.

@DustinCampbell @chuckries @wesrupert

:+1:


update for go 1.19

Codecov Report

Merging #22 (f31e2b3) into master (ec65c5f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   87.69%   87.69%
=======================================
  Files           5        5
  Lines          65       65
=======================================
  Hits           57       57
  Misses          7        7
  Partials        1        1

Impacted Files
Coverage Δ

internal/convert/convert.go
100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Added a panel for stdio for both LSP/PSP

It only seperate stdin and stdout right now regardless from which PSP/LSP it comes from.
Some performance consideration? How to make this better? Maybe allow user to configure the size of the buffer?
Some filters?
More seperation like request, response, notification, errors?

This will hopefully make debugging LSP/PSPs a lot easier.

[ ] Added an entry to CHANGELOG.md if this change could be valuable to users

Debugging with just the log is actually painful tho. This is still in draft stage, but I can imagine making queries like "what is the response for this request?" "Is this plugin still alive?". Another alternative is to improve the state of logging in Lapce by having something like structured logging which makes the log at least searchable with some grep and jq. But as I said, painful.

Painful but that's what I already planned months ago and it doesn't limit itself to just LSP

What did you plan?


Add to IPython wiki

Hi @nikhilk, and first thanks to share your project on github. I'm really interested in using ipython notebooks for javascript for my students next year, and your implementation seems quite valuable for my needs with both js on front and backend.
Maybe you know that there is another project implementing a javascript kernel for ipython/jupyter, it's named ijavascript and it is listed in the ipython wiki, maybe you could add you're project to the wiki to give it more visibility.

Yes, I need to - thanks for the reminder! Will keep this issue open as a reminder. I was hoping to get my github pages in order before linking.
In the meanwhile its great to hear you see this as promising for educational scenarios. I love the idea of js across the board. Any suggestions for what would be useful, the kinds of learning scenarios you plan for would be great to hear to help shape things out.

Hi @nikhilk and sorry for the delay. I think interactive computing is really nice to learn programming because students can work with code almost in real time without any boilerplate. I already used ipython notebook for this, and I'll continue to use it because python is a really nice language, however students are really interested in web development and so js is a must.
When they work on an interactive session things need to be as simple as possible with nice outputs and concise errors output.
I work with svg and canvas, it also would be nice to get inputs from the user and store easily these inputs as we can do in the ipython notebook.

Totally agree on the appeal of js.
Thanks for calling out some specifics. Some followup questions.

SVG and canvas -- I haven't done much here, but do you envision its interesting to have a cell define an instance of an SVG container or a canvas surface, and then a bunch of other cells working against that cell, i.e. the svg/canvas element from the one cell rather than each cell creating its own svg/canvas elements?

User inputs -- could you explain a bit more? Are you thinking about the interactive widgets in ipython? Or something else?

Related to web development, I am envisioning a web server associated with the notebook, and code within the notebook can stash some content and get a URI, or register a function defined in the notebook as a route handler, and then be able to make HTTP requests to that server from client-side script either in the notebook, or from some other app. This would make it possible to develop web APIs within the notebook - think express app implemented in a notebook. I just started, so this isn't available yet, but sharing as it seems like it would be relevant.


integrated CSP header/nonce generation

Rationale
Content Security Policies are the Next Great Thing (at least in larger organizations).  There are two parts to implementing CSPs:

Generating a nonce value that can be attached to inline <style> and <script> tags.

Generating a Content-Security-Policy header.

In an attempt to off load the tedium of implementing these features ad hoc for individual projects, I'd offer that allowing nitrogen_core to perform these tasks will result in less boilerplate code and provide a uniform means of developing Nitrogen apps making use of CSPs.
Summary
The CSP for a configuration can be configured via the application environment in the the appropriate config file.  Some effort has been made to make this an Erlang-friendly process: CSP domains (e.g., "script-src", "style-src") are available as atoms (script_src, style_src); source keywords (e.g., 'self', 'unsafe-eval') are also available as atoms (self, unsafe_eval). Furthermore, the source keyword nonce is expanded to nonce-<current-nonce-value> in the header.
The nonce value can be retrieved via wf:script_nonce/0, script_nonce now being a new attribute of the #context record.  This may be called out to from templates.
In the case where content_security_policy is not defined in the application environment, no header is set.
Examples
In app.config:
 {nitrogen_core,
  [{content_security_policy,
    [
      {default_src, [none]}
    , {script_src, [self, nonce, unsafe_eval,
                    "cdnjs.cloudflare.com",
                    "code.jquery.com",
                    "stackpath.bootstrapcdn.com",
                    "kit.fontawesome.com"]}
    , {connect_src, [self,
                     "*.fontawesome.com",
                     "ws://localhost:12303"]}
    , {img_src, [self]}
    , {base_uri, [self]}
    , {font_src, [self,
                  "use.fontawesome.com"]}
    , {style_src, [self,
                   nonce,
                   "*.fontawesome.com",
                   "stackpath.bootstrapcdn.com"]}
    , {form_action, [self]}
    ]}, ...

In a template file:
    <script nonce="[[[wf:script_nonce()]]]">
     [[[script]]]
    </script>

Notes
I honestly wasn't sure where to set the header.  It ended up in wf_core:build_first_response/2 but I'm not sure that's correct.  Any guidance would be appreciated!  (I believe this is the only type of response that requires the header.)
Make no mistake: this is non-trivial to use.  For reasons I haven't yet grokked, a construct like:
<div style="..." nonce="...">

does not pass muster in Safari (although it does in Firefox).  The "correct" way to do this is to define the ad hoc style as a CSS class and mark the element as belonging to the class.  It's tempting to suggest that nonce :: boolean() might be an appropriate new attribute to the #element_base record; when the element is rendered nonce=xxx could be added or not depending.  Given that this simply doesn't work on one of the major browsers (but I'm still investigating), I'm not sure that it doesn't give a developer a false sense of correctness.
I'm sorry about the whitespace changes, I know they make the diff harder to read.  I'm happy enough to re-submit if this is an issue.
Thank-you for your feedback in #125. I'll close that PR as I believe this work entirely supersedes what I was getting at there.

Quarantine seems to be treating you well.  I'm loving all these new contributions from you.
Keep going.
Would you mind also making the documentation for this?  This is probably enough to justify its own documentation page for content security policy (if you think so), otherwise, this can also go into the config.md page.

I sure can!


Some timings in the ratings are wrong

For 'In the Dark' there are a couple of ratings where the timings are clearly too long - over 15 hours.
This is putting off some people from playing the scenario because they believe it will take 6 hours to complete.

There was two very long playback :
916 minutes
1688 minutes
In both cases it's probably someone leaving the game running for half a day/a full day before returning to it.
I changed both time duration to 300 minutes so it does not break the average time.

It will take one hour to update.

Thanks for this.
It was getting some people worried.

Yes the game duration is indeed an important factor for scenario selection.


[Draft] Add functions to swizzle textures

[Draft]

needs to be tested.  where to get dx12 boilerplate?  test just that texute still looks correct, or also test performance improves when roteated?
maybe merge functions?  would then pass a boolean/enum to determine rowToSwizzle versus swizzleToRow

Added functions that converts pixel order from row major to standard swizzle and from standard swizzle to row major.
Functions for both 1 Image, and an array of Images.
Folwoing standard DirectXTex pattern: Uses Image and TexMetadata as input.  Outputs/initializes a ScratchImage.

@microsoft-github-policy-service agree company="Microsoft"

Note for testing, I'll add coverage to the test suite which will likely just do a swizzle and deswizzle and make sure the bits match.
As for determining if the swizzle is correct, I probably need to make a test app that renders using WARP which supports standard swizzle.


Interface proposal

Initial interface proposal as specified by @krisboit in #3 with node logic separated from wallet logic.

Things that are not covered:

Wallet generation, the mnemonic generation
encryption/decryption at import/export of wallet
storage: I personally think that storage shouldn't be treated in this library, if we offer encryption/decryption apps that are using this lib can store an encrypted wallet wherever they want

i created a branch on this repo, to be easier to change by anybody. let's continue the discussion on #5


Add --exclude / -E option to exclude classes from decompilation

Sometimes it's unnecessary to decompile certain classes, for example libraries such as Apache Commons. Skipping the decompilation of these classes can speed up the overall decompilation time. Currently there is --only option, but it doesn't cover cases where we don't know which classes in the JAR to decompile.
This PR adds --exclude or -E option to the decompiler. For convenience, it supports excluding multiple classes without multiple --exclude or -E invocations (can be separated by commas).
Examples:
# using --exclude to exclude org.apache.*
java -jar vineflower.jar --exclude=org/apache input.jar out_dir

# using -E to exclude multiple classes
java -jar vineflower.jar -E=org/apache,org/bouncycastle,com/google/android input.jar out_dir

I believe the consensus is to move away from the "short" options, so I am a bit torn about them being introduced for a new option.
Additionally, I'd prefer if the option is added to https://github.com/mvisat/vineflower/blob/49d8fd22f33df753aa2277d68adb548e0168151b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java. At this point in time this is not done and as such I myself would be considering the option to not exist unless I were to know otherwise (that is all options that are outside the IFernflowerPreferences are undocumented to me).

Thanks for the feedback :) I've updated the code to use IFernflowerPreferences. The option is now (tentatively) --excluded-classes or -exc.

Thanks a lot for this! I think the implementation is good, but my one request is to make the exclusion regex based rather than prefix based. It would help a lot for debugging.

Hey! I'm really sorry, but while doing branch cleanup I accidentally deleted the 1.10 branch before changing the base to 1.11. If you are able to re-create the pull request targeting 1.11, that would be greatly appreciated. Sorry for the trouble!


Be more specific on how you can permanently purge a keyvault

Added an example of how to perform the "POST action" and a link to the documenation in the CLI that performs this.

@sonic1981 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Hi, @sonic1981. Purging a Key Vault is possible via both CLI and PowerShell.  We specifically mention this after the bulleted list, and provide links to the procedural guidance:

Permanently deleting, purging, a key vault is possible via a POST operation on the proxy resource and requires special privileges. Generally, only the subscription owner will be able to purge a key vault. The POST operation triggers the immediate and irrecoverable deletion of that vault ...
For steps, see How to use Key Vault soft-delete with CLI: Purging a key vault or How to use Key Vault soft-delete with PowerShell: Purging a key vault.

Thanks! #please-close


Need to add frontera quadro 5000 cards

4.63 ns per photon
need to figure out how they are identified in logs

Added


Added external SQL database support

Perhaps you want to merge the external database support
Cheers,
Florian

Thanks. I changed useExternalDatabase from true to false so that per default, WebSQL (SQLite) is used.


feat: update sass-stylesheets-bulma to 0.9.4_ds

Sass and CSS framework using flexbox
Issue: https://github.com/deepin-community/sig-deepin-sysdev-team/issues/552
Log: update repo

/integrate