@marleena/trb-proto 1.0.51 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -238,6 +238,66 @@ export namespace TradeRecord {
238
238
  }
239
239
  }
240
240
 
241
+ export class BacktestIndicatorPoint extends jspb.Message {
242
+ getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
243
+ setTime(value?: google_protobuf_timestamp_pb.Timestamp): BacktestIndicatorPoint;
244
+ hasTime(): boolean;
245
+ clearTime(): BacktestIndicatorPoint;
246
+
247
+ getValuesMap(): jspb.Map<string, number>;
248
+ clearValuesMap(): BacktestIndicatorPoint;
249
+
250
+ serializeBinary(): Uint8Array;
251
+ toObject(includeInstance?: boolean): BacktestIndicatorPoint.AsObject;
252
+ static toObject(includeInstance: boolean, msg: BacktestIndicatorPoint): BacktestIndicatorPoint.AsObject;
253
+ static serializeBinaryToWriter(message: BacktestIndicatorPoint, writer: jspb.BinaryWriter): void;
254
+ static deserializeBinary(bytes: Uint8Array): BacktestIndicatorPoint;
255
+ static deserializeBinaryFromReader(message: BacktestIndicatorPoint, reader: jspb.BinaryReader): BacktestIndicatorPoint;
256
+ }
257
+
258
+ export namespace BacktestIndicatorPoint {
259
+ export type AsObject = {
260
+ time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
261
+ valuesMap: Array<[string, number]>,
262
+ }
263
+ }
264
+
265
+ export class BacktestIndicatorSeries extends jspb.Message {
266
+ getIndicatorId(): string;
267
+ setIndicatorId(value: string): BacktestIndicatorSeries;
268
+
269
+ getIndicator(): string;
270
+ setIndicator(value: string): BacktestIndicatorSeries;
271
+
272
+ getOutputKey(): string;
273
+ setOutputKey(value: string): BacktestIndicatorSeries;
274
+
275
+ getOverlay(): boolean;
276
+ setOverlay(value: boolean): BacktestIndicatorSeries;
277
+
278
+ getPointsList(): Array<BacktestIndicatorPoint>;
279
+ setPointsList(value: Array<BacktestIndicatorPoint>): BacktestIndicatorSeries;
280
+ clearPointsList(): BacktestIndicatorSeries;
281
+ addPoints(value?: BacktestIndicatorPoint, index?: number): BacktestIndicatorPoint;
282
+
283
+ serializeBinary(): Uint8Array;
284
+ toObject(includeInstance?: boolean): BacktestIndicatorSeries.AsObject;
285
+ static toObject(includeInstance: boolean, msg: BacktestIndicatorSeries): BacktestIndicatorSeries.AsObject;
286
+ static serializeBinaryToWriter(message: BacktestIndicatorSeries, writer: jspb.BinaryWriter): void;
287
+ static deserializeBinary(bytes: Uint8Array): BacktestIndicatorSeries;
288
+ static deserializeBinaryFromReader(message: BacktestIndicatorSeries, reader: jspb.BinaryReader): BacktestIndicatorSeries;
289
+ }
290
+
291
+ export namespace BacktestIndicatorSeries {
292
+ export type AsObject = {
293
+ indicatorId: string,
294
+ indicator: string,
295
+ outputKey: string,
296
+ overlay: boolean,
297
+ pointsList: Array<BacktestIndicatorPoint.AsObject>,
298
+ }
299
+ }
300
+
241
301
  export class BacktestRun extends jspb.Message {
242
302
  getRunId(): string;
243
303
  setRunId(value: string): BacktestRun;
@@ -26,6 +26,8 @@ goog.object.extend(proto, google_protobuf_timestamp_pb);
26
26
  var strategy_spec_pb = require('../strategy/spec_pb.js');
27
27
  goog.object.extend(proto, strategy_spec_pb);
28
28
  goog.exportSymbol('proto.trb.strategy.v1.BacktestConfig', null, global);
29
+ goog.exportSymbol('proto.trb.strategy.v1.BacktestIndicatorPoint', null, global);
30
+ goog.exportSymbol('proto.trb.strategy.v1.BacktestIndicatorSeries', null, global);
29
31
  goog.exportSymbol('proto.trb.strategy.v1.BacktestMetrics', null, global);
30
32
  goog.exportSymbol('proto.trb.strategy.v1.BacktestRun', null, global);
31
33
  goog.exportSymbol('proto.trb.strategy.v1.BacktestTask', null, global);
@@ -116,6 +118,48 @@ if (goog.DEBUG && !COMPILED) {
116
118
  */
117
119
  proto.trb.strategy.v1.TradeRecord.displayName = 'proto.trb.strategy.v1.TradeRecord';
118
120
  }
121
+ /**
122
+ * Generated by JsPbCodeGenerator.
123
+ * @param {Array=} opt_data Optional initial data array, typically from a
124
+ * server response, or constructed directly in Javascript. The array is used
125
+ * in place and becomes part of the constructed object. It is not cloned.
126
+ * If no data is provided, the constructed object will be empty, but still
127
+ * valid.
128
+ * @extends {jspb.Message}
129
+ * @constructor
130
+ */
131
+ proto.trb.strategy.v1.BacktestIndicatorPoint = function(opt_data) {
132
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
133
+ };
134
+ goog.inherits(proto.trb.strategy.v1.BacktestIndicatorPoint, jspb.Message);
135
+ if (goog.DEBUG && !COMPILED) {
136
+ /**
137
+ * @public
138
+ * @override
139
+ */
140
+ proto.trb.strategy.v1.BacktestIndicatorPoint.displayName = 'proto.trb.strategy.v1.BacktestIndicatorPoint';
141
+ }
142
+ /**
143
+ * Generated by JsPbCodeGenerator.
144
+ * @param {Array=} opt_data Optional initial data array, typically from a
145
+ * server response, or constructed directly in Javascript. The array is used
146
+ * in place and becomes part of the constructed object. It is not cloned.
147
+ * If no data is provided, the constructed object will be empty, but still
148
+ * valid.
149
+ * @extends {jspb.Message}
150
+ * @constructor
151
+ */
152
+ proto.trb.strategy.v1.BacktestIndicatorSeries = function(opt_data) {
153
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategy.v1.BacktestIndicatorSeries.repeatedFields_, null);
154
+ };
155
+ goog.inherits(proto.trb.strategy.v1.BacktestIndicatorSeries, jspb.Message);
156
+ if (goog.DEBUG && !COMPILED) {
157
+ /**
158
+ * @public
159
+ * @override
160
+ */
161
+ proto.trb.strategy.v1.BacktestIndicatorSeries.displayName = 'proto.trb.strategy.v1.BacktestIndicatorSeries';
162
+ }
119
163
  /**
120
164
  * Generated by JsPbCodeGenerator.
121
165
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1930,6 +1974,471 @@ proto.trb.strategy.v1.TradeRecord.prototype.setExitReason = function(value) {
1930
1974
 
1931
1975
 
1932
1976
 
1977
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1978
+ /**
1979
+ * Creates an object representation of this proto.
1980
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1981
+ * Optional fields that are not set will be set to undefined.
1982
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1983
+ * For the list of reserved names please see:
1984
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1985
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1986
+ * JSPB instance for transitional soy proto support:
1987
+ * http://goto/soy-param-migration
1988
+ * @return {!Object}
1989
+ */
1990
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.toObject = function(opt_includeInstance) {
1991
+ return proto.trb.strategy.v1.BacktestIndicatorPoint.toObject(opt_includeInstance, this);
1992
+ };
1993
+
1994
+
1995
+ /**
1996
+ * Static version of the {@see toObject} method.
1997
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1998
+ * the JSPB instance for transitional soy proto support:
1999
+ * http://goto/soy-param-migration
2000
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorPoint} msg The msg instance to transform.
2001
+ * @return {!Object}
2002
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2003
+ */
2004
+ proto.trb.strategy.v1.BacktestIndicatorPoint.toObject = function(includeInstance, msg) {
2005
+ var f, obj = {
2006
+ time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2007
+ valuesMap: (f = msg.getValuesMap()) ? f.toObject(includeInstance, undefined) : []
2008
+ };
2009
+
2010
+ if (includeInstance) {
2011
+ obj.$jspbMessageInstance = msg;
2012
+ }
2013
+ return obj;
2014
+ };
2015
+ }
2016
+
2017
+
2018
+ /**
2019
+ * Deserializes binary data (in protobuf wire format).
2020
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2021
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorPoint}
2022
+ */
2023
+ proto.trb.strategy.v1.BacktestIndicatorPoint.deserializeBinary = function(bytes) {
2024
+ var reader = new jspb.BinaryReader(bytes);
2025
+ var msg = new proto.trb.strategy.v1.BacktestIndicatorPoint;
2026
+ return proto.trb.strategy.v1.BacktestIndicatorPoint.deserializeBinaryFromReader(msg, reader);
2027
+ };
2028
+
2029
+
2030
+ /**
2031
+ * Deserializes binary data (in protobuf wire format) from the
2032
+ * given reader into the given message object.
2033
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorPoint} msg The message object to deserialize into.
2034
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2035
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorPoint}
2036
+ */
2037
+ proto.trb.strategy.v1.BacktestIndicatorPoint.deserializeBinaryFromReader = function(msg, reader) {
2038
+ while (reader.nextField()) {
2039
+ if (reader.isEndGroup()) {
2040
+ break;
2041
+ }
2042
+ var field = reader.getFieldNumber();
2043
+ switch (field) {
2044
+ case 1:
2045
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2046
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2047
+ msg.setTime(value);
2048
+ break;
2049
+ case 2:
2050
+ var value = msg.getValuesMap();
2051
+ reader.readMessage(value, function(message, reader) {
2052
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
2053
+ });
2054
+ break;
2055
+ default:
2056
+ reader.skipField();
2057
+ break;
2058
+ }
2059
+ }
2060
+ return msg;
2061
+ };
2062
+
2063
+
2064
+ /**
2065
+ * Serializes the message to binary data (in protobuf wire format).
2066
+ * @return {!Uint8Array}
2067
+ */
2068
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.serializeBinary = function() {
2069
+ var writer = new jspb.BinaryWriter();
2070
+ proto.trb.strategy.v1.BacktestIndicatorPoint.serializeBinaryToWriter(this, writer);
2071
+ return writer.getResultBuffer();
2072
+ };
2073
+
2074
+
2075
+ /**
2076
+ * Serializes the given message to binary data (in protobuf wire
2077
+ * format), writing to the given BinaryWriter.
2078
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorPoint} message
2079
+ * @param {!jspb.BinaryWriter} writer
2080
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2081
+ */
2082
+ proto.trb.strategy.v1.BacktestIndicatorPoint.serializeBinaryToWriter = function(message, writer) {
2083
+ var f = undefined;
2084
+ f = message.getTime();
2085
+ if (f != null) {
2086
+ writer.writeMessage(
2087
+ 1,
2088
+ f,
2089
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2090
+ );
2091
+ }
2092
+ f = message.getValuesMap(true);
2093
+ if (f && f.getLength() > 0) {
2094
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
2095
+ }
2096
+ };
2097
+
2098
+
2099
+ /**
2100
+ * optional google.protobuf.Timestamp time = 1;
2101
+ * @return {?proto.google.protobuf.Timestamp}
2102
+ */
2103
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.getTime = function() {
2104
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2105
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
2106
+ };
2107
+
2108
+
2109
+ /**
2110
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2111
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorPoint} returns this
2112
+ */
2113
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.setTime = function(value) {
2114
+ return jspb.Message.setWrapperField(this, 1, value);
2115
+ };
2116
+
2117
+
2118
+ /**
2119
+ * Clears the message field making it undefined.
2120
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorPoint} returns this
2121
+ */
2122
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.clearTime = function() {
2123
+ return this.setTime(undefined);
2124
+ };
2125
+
2126
+
2127
+ /**
2128
+ * Returns whether this field is set.
2129
+ * @return {boolean}
2130
+ */
2131
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.hasTime = function() {
2132
+ return jspb.Message.getField(this, 1) != null;
2133
+ };
2134
+
2135
+
2136
+ /**
2137
+ * map<string, double> values = 2;
2138
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
2139
+ * empty, instead returning `undefined`
2140
+ * @return {!jspb.Map<string,number>}
2141
+ */
2142
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.getValuesMap = function(opt_noLazyCreate) {
2143
+ return /** @type {!jspb.Map<string,number>} */ (
2144
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
2145
+ null));
2146
+ };
2147
+
2148
+
2149
+ /**
2150
+ * Clears values from the map. The map will be non-null.
2151
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorPoint} returns this
2152
+ */
2153
+ proto.trb.strategy.v1.BacktestIndicatorPoint.prototype.clearValuesMap = function() {
2154
+ this.getValuesMap().clear();
2155
+ return this;
2156
+ };
2157
+
2158
+
2159
+
2160
+ /**
2161
+ * List of repeated fields within this message type.
2162
+ * @private {!Array<number>}
2163
+ * @const
2164
+ */
2165
+ proto.trb.strategy.v1.BacktestIndicatorSeries.repeatedFields_ = [5];
2166
+
2167
+
2168
+
2169
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2170
+ /**
2171
+ * Creates an object representation of this proto.
2172
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2173
+ * Optional fields that are not set will be set to undefined.
2174
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2175
+ * For the list of reserved names please see:
2176
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2177
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2178
+ * JSPB instance for transitional soy proto support:
2179
+ * http://goto/soy-param-migration
2180
+ * @return {!Object}
2181
+ */
2182
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.toObject = function(opt_includeInstance) {
2183
+ return proto.trb.strategy.v1.BacktestIndicatorSeries.toObject(opt_includeInstance, this);
2184
+ };
2185
+
2186
+
2187
+ /**
2188
+ * Static version of the {@see toObject} method.
2189
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2190
+ * the JSPB instance for transitional soy proto support:
2191
+ * http://goto/soy-param-migration
2192
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorSeries} msg The msg instance to transform.
2193
+ * @return {!Object}
2194
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2195
+ */
2196
+ proto.trb.strategy.v1.BacktestIndicatorSeries.toObject = function(includeInstance, msg) {
2197
+ var f, obj = {
2198
+ indicatorId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2199
+ indicator: jspb.Message.getFieldWithDefault(msg, 2, ""),
2200
+ outputKey: jspb.Message.getFieldWithDefault(msg, 3, ""),
2201
+ overlay: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
2202
+ pointsList: jspb.Message.toObjectList(msg.getPointsList(),
2203
+ proto.trb.strategy.v1.BacktestIndicatorPoint.toObject, includeInstance)
2204
+ };
2205
+
2206
+ if (includeInstance) {
2207
+ obj.$jspbMessageInstance = msg;
2208
+ }
2209
+ return obj;
2210
+ };
2211
+ }
2212
+
2213
+
2214
+ /**
2215
+ * Deserializes binary data (in protobuf wire format).
2216
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2217
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries}
2218
+ */
2219
+ proto.trb.strategy.v1.BacktestIndicatorSeries.deserializeBinary = function(bytes) {
2220
+ var reader = new jspb.BinaryReader(bytes);
2221
+ var msg = new proto.trb.strategy.v1.BacktestIndicatorSeries;
2222
+ return proto.trb.strategy.v1.BacktestIndicatorSeries.deserializeBinaryFromReader(msg, reader);
2223
+ };
2224
+
2225
+
2226
+ /**
2227
+ * Deserializes binary data (in protobuf wire format) from the
2228
+ * given reader into the given message object.
2229
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorSeries} msg The message object to deserialize into.
2230
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2231
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries}
2232
+ */
2233
+ proto.trb.strategy.v1.BacktestIndicatorSeries.deserializeBinaryFromReader = function(msg, reader) {
2234
+ while (reader.nextField()) {
2235
+ if (reader.isEndGroup()) {
2236
+ break;
2237
+ }
2238
+ var field = reader.getFieldNumber();
2239
+ switch (field) {
2240
+ case 1:
2241
+ var value = /** @type {string} */ (reader.readString());
2242
+ msg.setIndicatorId(value);
2243
+ break;
2244
+ case 2:
2245
+ var value = /** @type {string} */ (reader.readString());
2246
+ msg.setIndicator(value);
2247
+ break;
2248
+ case 3:
2249
+ var value = /** @type {string} */ (reader.readString());
2250
+ msg.setOutputKey(value);
2251
+ break;
2252
+ case 4:
2253
+ var value = /** @type {boolean} */ (reader.readBool());
2254
+ msg.setOverlay(value);
2255
+ break;
2256
+ case 5:
2257
+ var value = new proto.trb.strategy.v1.BacktestIndicatorPoint;
2258
+ reader.readMessage(value,proto.trb.strategy.v1.BacktestIndicatorPoint.deserializeBinaryFromReader);
2259
+ msg.addPoints(value);
2260
+ break;
2261
+ default:
2262
+ reader.skipField();
2263
+ break;
2264
+ }
2265
+ }
2266
+ return msg;
2267
+ };
2268
+
2269
+
2270
+ /**
2271
+ * Serializes the message to binary data (in protobuf wire format).
2272
+ * @return {!Uint8Array}
2273
+ */
2274
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.serializeBinary = function() {
2275
+ var writer = new jspb.BinaryWriter();
2276
+ proto.trb.strategy.v1.BacktestIndicatorSeries.serializeBinaryToWriter(this, writer);
2277
+ return writer.getResultBuffer();
2278
+ };
2279
+
2280
+
2281
+ /**
2282
+ * Serializes the given message to binary data (in protobuf wire
2283
+ * format), writing to the given BinaryWriter.
2284
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorSeries} message
2285
+ * @param {!jspb.BinaryWriter} writer
2286
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2287
+ */
2288
+ proto.trb.strategy.v1.BacktestIndicatorSeries.serializeBinaryToWriter = function(message, writer) {
2289
+ var f = undefined;
2290
+ f = message.getIndicatorId();
2291
+ if (f.length > 0) {
2292
+ writer.writeString(
2293
+ 1,
2294
+ f
2295
+ );
2296
+ }
2297
+ f = message.getIndicator();
2298
+ if (f.length > 0) {
2299
+ writer.writeString(
2300
+ 2,
2301
+ f
2302
+ );
2303
+ }
2304
+ f = message.getOutputKey();
2305
+ if (f.length > 0) {
2306
+ writer.writeString(
2307
+ 3,
2308
+ f
2309
+ );
2310
+ }
2311
+ f = message.getOverlay();
2312
+ if (f) {
2313
+ writer.writeBool(
2314
+ 4,
2315
+ f
2316
+ );
2317
+ }
2318
+ f = message.getPointsList();
2319
+ if (f.length > 0) {
2320
+ writer.writeRepeatedMessage(
2321
+ 5,
2322
+ f,
2323
+ proto.trb.strategy.v1.BacktestIndicatorPoint.serializeBinaryToWriter
2324
+ );
2325
+ }
2326
+ };
2327
+
2328
+
2329
+ /**
2330
+ * optional string indicator_id = 1;
2331
+ * @return {string}
2332
+ */
2333
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.getIndicatorId = function() {
2334
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2335
+ };
2336
+
2337
+
2338
+ /**
2339
+ * @param {string} value
2340
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries} returns this
2341
+ */
2342
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.setIndicatorId = function(value) {
2343
+ return jspb.Message.setProto3StringField(this, 1, value);
2344
+ };
2345
+
2346
+
2347
+ /**
2348
+ * optional string indicator = 2;
2349
+ * @return {string}
2350
+ */
2351
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.getIndicator = function() {
2352
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2353
+ };
2354
+
2355
+
2356
+ /**
2357
+ * @param {string} value
2358
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries} returns this
2359
+ */
2360
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.setIndicator = function(value) {
2361
+ return jspb.Message.setProto3StringField(this, 2, value);
2362
+ };
2363
+
2364
+
2365
+ /**
2366
+ * optional string output_key = 3;
2367
+ * @return {string}
2368
+ */
2369
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.getOutputKey = function() {
2370
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2371
+ };
2372
+
2373
+
2374
+ /**
2375
+ * @param {string} value
2376
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries} returns this
2377
+ */
2378
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.setOutputKey = function(value) {
2379
+ return jspb.Message.setProto3StringField(this, 3, value);
2380
+ };
2381
+
2382
+
2383
+ /**
2384
+ * optional bool overlay = 4;
2385
+ * @return {boolean}
2386
+ */
2387
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.getOverlay = function() {
2388
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
2389
+ };
2390
+
2391
+
2392
+ /**
2393
+ * @param {boolean} value
2394
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries} returns this
2395
+ */
2396
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.setOverlay = function(value) {
2397
+ return jspb.Message.setProto3BooleanField(this, 4, value);
2398
+ };
2399
+
2400
+
2401
+ /**
2402
+ * repeated BacktestIndicatorPoint points = 5;
2403
+ * @return {!Array<!proto.trb.strategy.v1.BacktestIndicatorPoint>}
2404
+ */
2405
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.getPointsList = function() {
2406
+ return /** @type{!Array<!proto.trb.strategy.v1.BacktestIndicatorPoint>} */ (
2407
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.strategy.v1.BacktestIndicatorPoint, 5));
2408
+ };
2409
+
2410
+
2411
+ /**
2412
+ * @param {!Array<!proto.trb.strategy.v1.BacktestIndicatorPoint>} value
2413
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries} returns this
2414
+ */
2415
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.setPointsList = function(value) {
2416
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
2417
+ };
2418
+
2419
+
2420
+ /**
2421
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorPoint=} opt_value
2422
+ * @param {number=} opt_index
2423
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorPoint}
2424
+ */
2425
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.addPoints = function(opt_value, opt_index) {
2426
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.trb.strategy.v1.BacktestIndicatorPoint, opt_index);
2427
+ };
2428
+
2429
+
2430
+ /**
2431
+ * Clears the list making it empty but non-null.
2432
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries} returns this
2433
+ */
2434
+ proto.trb.strategy.v1.BacktestIndicatorSeries.prototype.clearPointsList = function() {
2435
+ return this.setPointsList([]);
2436
+ };
2437
+
2438
+
2439
+
2440
+
2441
+
1933
2442
  if (jspb.Message.GENERATE_TO_OBJECT) {
1934
2443
  /**
1935
2444
  * Creates an object representation of this proto.
@@ -392,6 +392,9 @@ export class GetBacktestResultRequest extends jspb.Message {
392
392
  getEquityMaxPoints(): number;
393
393
  setEquityMaxPoints(value: number): GetBacktestResultRequest;
394
394
 
395
+ getIncludeIndicators(): boolean;
396
+ setIncludeIndicators(value: boolean): GetBacktestResultRequest;
397
+
395
398
  serializeBinary(): Uint8Array;
396
399
  toObject(includeInstance?: boolean): GetBacktestResultRequest.AsObject;
397
400
  static toObject(includeInstance: boolean, msg: GetBacktestResultRequest): GetBacktestResultRequest.AsObject;
@@ -406,6 +409,7 @@ export namespace GetBacktestResultRequest {
406
409
  includeEquity: boolean,
407
410
  includeTrades: boolean,
408
411
  equityMaxPoints: number,
412
+ includeIndicators: boolean,
409
413
  }
410
414
  }
411
415
 
@@ -430,6 +434,11 @@ export class GetBacktestResultResponse extends jspb.Message {
430
434
  clearTradesList(): GetBacktestResultResponse;
431
435
  addTrades(value?: strategy_backtest_pb.TradeRecord, index?: number): strategy_backtest_pb.TradeRecord;
432
436
 
437
+ getIndicatorsList(): Array<strategy_backtest_pb.BacktestIndicatorSeries>;
438
+ setIndicatorsList(value: Array<strategy_backtest_pb.BacktestIndicatorSeries>): GetBacktestResultResponse;
439
+ clearIndicatorsList(): GetBacktestResultResponse;
440
+ addIndicators(value?: strategy_backtest_pb.BacktestIndicatorSeries, index?: number): strategy_backtest_pb.BacktestIndicatorSeries;
441
+
433
442
  serializeBinary(): Uint8Array;
434
443
  toObject(includeInstance?: boolean): GetBacktestResultResponse.AsObject;
435
444
  static toObject(includeInstance: boolean, msg: GetBacktestResultResponse): GetBacktestResultResponse.AsObject;
@@ -444,6 +453,7 @@ export namespace GetBacktestResultResponse {
444
453
  metrics?: strategy_backtest_pb.BacktestMetrics.AsObject,
445
454
  equityList: Array<strategy_backtest_pb.EquityPoint.AsObject>,
446
455
  tradesList: Array<strategy_backtest_pb.TradeRecord.AsObject>,
456
+ indicatorsList: Array<strategy_backtest_pb.BacktestIndicatorSeries.AsObject>,
447
457
  }
448
458
  }
449
459
 
@@ -3480,7 +3480,8 @@ proto.trb.strategy.v1.GetBacktestResultRequest.toObject = function(includeInstan
3480
3480
  runId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3481
3481
  includeEquity: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
3482
3482
  includeTrades: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
3483
- equityMaxPoints: jspb.Message.getFieldWithDefault(msg, 4, 0)
3483
+ equityMaxPoints: jspb.Message.getFieldWithDefault(msg, 4, 0),
3484
+ includeIndicators: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
3484
3485
  };
3485
3486
 
3486
3487
  if (includeInstance) {
@@ -3533,6 +3534,10 @@ proto.trb.strategy.v1.GetBacktestResultRequest.deserializeBinaryFromReader = fun
3533
3534
  var value = /** @type {number} */ (reader.readInt32());
3534
3535
  msg.setEquityMaxPoints(value);
3535
3536
  break;
3537
+ case 5:
3538
+ var value = /** @type {boolean} */ (reader.readBool());
3539
+ msg.setIncludeIndicators(value);
3540
+ break;
3536
3541
  default:
3537
3542
  reader.skipField();
3538
3543
  break;
@@ -3590,6 +3595,13 @@ proto.trb.strategy.v1.GetBacktestResultRequest.serializeBinaryToWriter = functio
3590
3595
  f
3591
3596
  );
3592
3597
  }
3598
+ f = message.getIncludeIndicators();
3599
+ if (f) {
3600
+ writer.writeBool(
3601
+ 5,
3602
+ f
3603
+ );
3604
+ }
3593
3605
  };
3594
3606
 
3595
3607
 
@@ -3665,13 +3677,31 @@ proto.trb.strategy.v1.GetBacktestResultRequest.prototype.setEquityMaxPoints = fu
3665
3677
  };
3666
3678
 
3667
3679
 
3680
+ /**
3681
+ * optional bool include_indicators = 5;
3682
+ * @return {boolean}
3683
+ */
3684
+ proto.trb.strategy.v1.GetBacktestResultRequest.prototype.getIncludeIndicators = function() {
3685
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
3686
+ };
3687
+
3688
+
3689
+ /**
3690
+ * @param {boolean} value
3691
+ * @return {!proto.trb.strategy.v1.GetBacktestResultRequest} returns this
3692
+ */
3693
+ proto.trb.strategy.v1.GetBacktestResultRequest.prototype.setIncludeIndicators = function(value) {
3694
+ return jspb.Message.setProto3BooleanField(this, 5, value);
3695
+ };
3696
+
3697
+
3668
3698
 
3669
3699
  /**
3670
3700
  * List of repeated fields within this message type.
3671
3701
  * @private {!Array<number>}
3672
3702
  * @const
3673
3703
  */
3674
- proto.trb.strategy.v1.GetBacktestResultResponse.repeatedFields_ = [3,4];
3704
+ proto.trb.strategy.v1.GetBacktestResultResponse.repeatedFields_ = [3,4,5];
3675
3705
 
3676
3706
 
3677
3707
 
@@ -3709,7 +3739,9 @@ metrics: (f = msg.getMetrics()) && strategy_backtest_pb.BacktestMetrics.toObject
3709
3739
  equityList: jspb.Message.toObjectList(msg.getEquityList(),
3710
3740
  strategy_backtest_pb.EquityPoint.toObject, includeInstance),
3711
3741
  tradesList: jspb.Message.toObjectList(msg.getTradesList(),
3712
- strategy_backtest_pb.TradeRecord.toObject, includeInstance)
3742
+ strategy_backtest_pb.TradeRecord.toObject, includeInstance),
3743
+ indicatorsList: jspb.Message.toObjectList(msg.getIndicatorsList(),
3744
+ strategy_backtest_pb.BacktestIndicatorSeries.toObject, includeInstance)
3713
3745
  };
3714
3746
 
3715
3747
  if (includeInstance) {
@@ -3766,6 +3798,11 @@ proto.trb.strategy.v1.GetBacktestResultResponse.deserializeBinaryFromReader = fu
3766
3798
  reader.readMessage(value,strategy_backtest_pb.TradeRecord.deserializeBinaryFromReader);
3767
3799
  msg.addTrades(value);
3768
3800
  break;
3801
+ case 5:
3802
+ var value = new strategy_backtest_pb.BacktestIndicatorSeries;
3803
+ reader.readMessage(value,strategy_backtest_pb.BacktestIndicatorSeries.deserializeBinaryFromReader);
3804
+ msg.addIndicators(value);
3805
+ break;
3769
3806
  default:
3770
3807
  reader.skipField();
3771
3808
  break;
@@ -3827,6 +3864,14 @@ proto.trb.strategy.v1.GetBacktestResultResponse.serializeBinaryToWriter = functi
3827
3864
  strategy_backtest_pb.TradeRecord.serializeBinaryToWriter
3828
3865
  );
3829
3866
  }
3867
+ f = message.getIndicatorsList();
3868
+ if (f.length > 0) {
3869
+ writer.writeRepeatedMessage(
3870
+ 5,
3871
+ f,
3872
+ strategy_backtest_pb.BacktestIndicatorSeries.serializeBinaryToWriter
3873
+ );
3874
+ }
3830
3875
  };
3831
3876
 
3832
3877
 
@@ -3980,6 +4025,44 @@ proto.trb.strategy.v1.GetBacktestResultResponse.prototype.clearTradesList = func
3980
4025
  };
3981
4026
 
3982
4027
 
4028
+ /**
4029
+ * repeated BacktestIndicatorSeries indicators = 5;
4030
+ * @return {!Array<!proto.trb.strategy.v1.BacktestIndicatorSeries>}
4031
+ */
4032
+ proto.trb.strategy.v1.GetBacktestResultResponse.prototype.getIndicatorsList = function() {
4033
+ return /** @type{!Array<!proto.trb.strategy.v1.BacktestIndicatorSeries>} */ (
4034
+ jspb.Message.getRepeatedWrapperField(this, strategy_backtest_pb.BacktestIndicatorSeries, 5));
4035
+ };
4036
+
4037
+
4038
+ /**
4039
+ * @param {!Array<!proto.trb.strategy.v1.BacktestIndicatorSeries>} value
4040
+ * @return {!proto.trb.strategy.v1.GetBacktestResultResponse} returns this
4041
+ */
4042
+ proto.trb.strategy.v1.GetBacktestResultResponse.prototype.setIndicatorsList = function(value) {
4043
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
4044
+ };
4045
+
4046
+
4047
+ /**
4048
+ * @param {!proto.trb.strategy.v1.BacktestIndicatorSeries=} opt_value
4049
+ * @param {number=} opt_index
4050
+ * @return {!proto.trb.strategy.v1.BacktestIndicatorSeries}
4051
+ */
4052
+ proto.trb.strategy.v1.GetBacktestResultResponse.prototype.addIndicators = function(opt_value, opt_index) {
4053
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.trb.strategy.v1.BacktestIndicatorSeries, opt_index);
4054
+ };
4055
+
4056
+
4057
+ /**
4058
+ * Clears the list making it empty but non-null.
4059
+ * @return {!proto.trb.strategy.v1.GetBacktestResultResponse} returns this
4060
+ */
4061
+ proto.trb.strategy.v1.GetBacktestResultResponse.prototype.clearIndicatorsList = function() {
4062
+ return this.setIndicatorsList([]);
4063
+ };
4064
+
4065
+
3983
4066
 
3984
4067
 
3985
4068
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marleena/trb-proto",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "description": "Generated protobuf messages and gRPC-Web clients for TrB services",
5
5
  "license": "MIT",
6
6
  "repository": {