KING X HUNTERS SOFTWARE OFFICIAL
* {
font-family: ‘Roboto Slab’, serif;
}
.show-on-mobile {
display: none;
width: 100%;
background: #003087;
padding: 20px;
margin-bottom: 25px;
}
.wrapper {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
height: 100vh;
overflow-x: hidden;
}
.wrapper .main-form {
display: flex;
align-items: center;
justify-content: space-evenly;
flex-direction: column;
flex: 1;
height: 100%;
padding: 15px;
}
.wrapper .main-form form {
width: 80%;
}
.wrapper .main-form form .split-size {
width: 100%;
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.wrapper .main-form form .split-size .form-group {
width: 49%;
}
.wrapper .caption-area {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
background: #003087 url(https://i.imgur.com/5ZybQHM.png) no-repeat 100% 100% / contain;
height: 100%;
padding: 15px;
position: relative;
}
.wrapper .caption-area .logo img {
position: absolute;
right: 50%;
top: 25px;
width: 35%;
transform: translateX(50%);
}
.btn-primary {
background-color: #36c763;
border-color: #36c763;
}
.btn-primary:hover {
background-color: #36c763;
border-color: #36c763;
}
@media (max-width: 1000px) {
.wrapper .main-form form {
width: 90%;
}
.wrapper .main-form {
overflow-y: scroll;
}
.wrapper .caption-area {
background: #003087 url(https://i.imgur.com/5ZybQHM.png) no-repeat 100% 100% / cover;
}
.wrapper .caption-area .logo img {
width: 55%;
}
.wrapper .main-form form .split-size {
flex-direction: column;
}
.wrapper .main-form form .split-size .form-group {
width: 100%;
}
}
@media (max-width: 850px) {
.wrapper {
height: auto;
}
.show-on-mobile {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.show-on-mobile img {
width: 45%;
}
.wrapper .main-form {
width: 100%;
flex: initial;
}
.wrapper .caption-area {
display: none;
}
.wrapper .main-form {
background: #FF1744;
}
.wrapper .main-form form {
width: 80%;
background: #FFEB3B;
padding: 20px;
-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.15);
border-radius: 10px;
}
.wrapper .main-form form .split-size {
flex-direction: initial;
}
.wrapper .main-form form .split-size .form-group {
width: 49%;
}
}
@media (max-width: 580px) {
.wrapper .main-form form {
width: 90%;
}
.wrapper .main-form {
overflow-y: scroll;
}
.wrapper .main-form form .split-size {
flex-direction: column;
}
.wrapper .main-form form .split-size .form-group {
width: 100%;
}
}
All ASSETS
AUD_CAD
AUD_CHF
AUD_JPY
AUD_USD
CAD_JPY
EUR_AUD
EUR_CAD
EUR_CHF
EUR_GBP
EUR_JPY
EUR_NZD
EUR_USD
GBP_AUD
GBP_CAD
GBP_CHF
GBP_JPY
GBP_NZD
GBP_USD
NZD_CHF
NZD_USD
USD_CAD
USD_CHF
USD_JPY
75%
76%
77%
78%
79%
80%
81%
82%
83%
84%
85%
86%
87%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%
99%
100%
75%
76%
77%
78%
79%
80%
81%
82%
83%
84%
85%
86%
87%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%
99%
100%
M1
M2>
M5
M15
M30
H1
H2
H4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
0
1
2
3
4
5
6
7
8
PUT
CALL
Generate Signals
https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js
https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js
hoje = new Date();
dia = hoje.getDate() + 0;
dias = hoje.getDay() + 1;
mes = hoje.getMonth() + 1;
ano = hoje.getYear();
var listBestPairTimes = [];
var listPairs = [
“EUR_USD”,
“GBP_AUD”,
“EUR_AUD”,
“EUR_JPY”,
“GBP_CAD”,
“USD_JPY”,
“EUR_CHF”,
“AUD_CAD”,
“GBP_CHF”,
“EUR_GBP”,
“AUD_CHF”,
“CAD_JPY”,
“GBP_JPY”,
“EUR_CAD”,
“AUD_JPY”,
“GBP_NZD”,
];
var percentageMin = 100;
var percentageMax = 100;
var candleTime = ‘M5’;
var daysAnalyse = 20;
var martingales = 0;
var orderType = ‘PUT’;
var timeInit = 2;
var timeEnd = 18;
var requestNumber = 0;
//First action when clicking on PROCESS DATA button
function getHistoric() {
$(‘body’).css(‘cursor’, ‘progress’);
listBestPairTimes = [];
getParameter();
//I check if the Asset field is in All Assets if not it searches for the selected asset
if (cbAtivo == 0) {
requestNumber = listPairs.length;
} else {
listPairs = [cbAtivo];
requestNumber = listPairs.length;
}
var count = CalculateCountCandles();
if (count > 50000) {
alert(‘The number of candles exceeds 50,000, please decrease the number of days analyzed’);
return;
}
for (var i = 0; i < listPairs.length; i++) {
var currentPair = listPairs[i];
callHistoricData(currentPair, count, cbAtivo);
}
}
function getParameter() {
percentageMin = $('#selPercentageMin').val();
percentageMax = $('#selPercentageMax').val();
candleTime = $('#selCandleTime').val();
daysAnalyse = $('#selDays').val();
martingales = $('#selMartingales').val();
orderType = $('#selOrderType').val();
timeInit = $('#selTimeInit').val();
timeEnd = $('#selTimeEnd').val();
cbAtivo = $('#cbAtivo').val();
}
function CalculateCountCandles() {
var minutes = 15; // DEFAULT FOR M15
switch (candleTime) {
case 'M2':
minutes = 2;
break;
case 'M2':
minutes = 2;
break;
case 'M10':
minutes = 10;
break;
case 'M15':
minutes = 15;
break;
case 'M30':
minutes = 30;
break;
case 'H1':
minutes = 60;
break;
case 'H2':
minutes = 120;
break;
case 'H4':
minutes = 240;
break;
}
var count = 60 / minutes;
count = 24 * count;
count = count * daysAnalyse;
return count;
}
function callHistoricData(pair, count, cbAtivo) {
var count_i = 0;
if (cbAtivo == 0) {
//var urlHist = "https://api-fxtrade.oanda.com/v1/candles?instrument="+pair+"&start=1565395200&end=1569283200&granularity=M1";
//var urlHist = "https://api-fxtrade.oanda.com/v1/candles?instrument="+pair+"&start="+startDate+"&end="+endDate+"&granularity="+candleTime+"&candleFormat=midpoint";
//var urlHist = "https://api-fxpractice.oanda.com/v3/instruments/"+pair+"/candles?from="+startDate+"&to="+endDate+"&granularity="+candleTime+"";
var urlHist =
'https://api-fxpractice.oanda.com/v3/instruments/' +
pair +
'/candles?granularity=' +
candleTime +
'&count=' +
count;
$.ajax({
url: urlHist,
headers: {
Authorization: 'Bearer eb2326208921b413a87728832f191f03-d9be68b74884f7d3107b9f05ca305319',
},
type: 'GET',
success: function (result) {
CalculateHistoric(result);
},
error: function (error) {
ErrorHistoric(error);
},
});
} else {
if (count_i == 0) {
//(cbAtivo == pair && count_i == 0 ){
//alert(cbAtivo);
//count_i ++;
var urlHist =
'https://api-fxpractice.oanda.com/v3/instruments/' +
pair +
'/candles?granularity=' +
candleTime +
'&count=' +
count;
$.ajax({
url: urlHist,
headers: {
Authorization:
'Bearer eb2326208921b413a87728832f191f03-d9be68b74884f7d3107b9f05ca305319',
},
type: 'GET',
success: function (result) {
CalculateHistoric(result);
},
error: function (error) {
ErrorHistoric(error);
},
});
}
}
}
function CalculateHistoric(result) {
var candles = result.candles;
var candlesResult = [];
for (var i = 0; i < candles.length; i++) {
var candle = candles[i];
var item = new Object();
item.resultValue = candle.mid.o – candle.mid.c;
item.date = ConvertDate(candle.time);
item.result = GetStringResult(item.resultValue);
item.percentDif = (item.resultValue * 100) / candle.mid.o;
if (item.result === orderType) {
item.win = true;
} else {
item.win = false;
}
//if(CheckTime(item.date)){
var arrayTime = item.date.time.split(':');
if (parseInt(arrayTime[0]) parseInt(timeEnd)) {
continue;
}
candlesResult.push(item);
}
var martinGaleResult = candlesResult;
if (martingales > 0) {
martinGaleResult = [];
for (var i = 0; i s.date.time))).map((time) => {
return {
time: time,
candles: martinGaleResult.filter((s) => s.date.time === time),
pair: result.instrument,
};
});
for (var i = 0; i < timeGroupedCandles.length; i++) {
var currentGroup = timeGroupedCandles[i];
currentGroup.winrate = 0;
currentGroup.averageTickDif = 0;
for (var z = 0; z = percentageMin && currentGroup.winrate s.win === true);
return anyWin != undefined && anyWin != null > 0 ? true : false;
}
function GetNextMartingales(listCandles, index) {
var nextCandles = [];
var candle = listCandles[index];
if (martingales > 0 && parseInt(index) + parseInt(martingales) < listCandles.length) {
for (var i = 1; i <= martingales; i++) {
var nextCandle = listCandles[index + i];
nextCandles.push(nextCandle);
}
return nextCandles;
} else {
return nextCandles;
}
}
function DownloadTxt(){
if(listBestPairTimes.length (a.time > b.time) ? 1 : -1)
var listNumber = listBestPairTimes.length / 80;
var i = 0
var stringList2 = “KING X HUNTERS BINARY SOFTWARE_”+candleTime;
for(var x = 0; x < listNumber; x++){
var index = 1;
var stringList = "List Of Software Signals 2023_"+candleTime;
stringList2 += "\r\n- – – – – – – – – – – – – – – – – – – – – ";
for(; i < listBestPairTimes.length; i++){
var candle = listBestPairTimes[i];
var arrayTime = candle.time.split(':');
//alert(candle.pair);
for(var z = 0; z 0 && (i+1) % 80 == 0){
i++;
break;
}
}
/* stringList += “\r\ns_title_settings====== TRADING SETTINGS ============”;
stringList += “\r\nMartingaleType=0”;
stringList += “\r\nMartingaleSteps=”+martingales;
stringList += “\r\nMartingaleCoef=2.2”; */
//download(percentageMin +” – ” +percentageMax + ‘_’ + orderType + ‘_’ + candleTime + “ListaSinais_” +parseInt(x+1).toString() + “.set”, stringList);
}
download(percentageMin +” – “+percentageMax + ‘_’ + orderType + ‘_’ + candleTime + ‘_Toexcel.txt’, stringList2);
}
function download(filename, text) {
$(‘body’).css(‘cursor’, ‘default’);
var element = document.createElement(‘a’);
element.setAttribute(‘href’, ‘data:text/plain;charset=utf-8,’ + encodeURIComponent(text));
element.setAttribute(‘download’, filename);
element.style.display = ‘none’;
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
function GetStringResult(value) {
if (value > 0) {
return ‘PUT’;
} else if (value < 0) {
return 'CALL';
} else {
return 'DRAW';
}
}
function ErrorHistoric(error) {
alert('erro');
}
function ConvertDate(time) {
//var stringDate = unixTimestamp.toString().slice(0, -6);
//unixTimestamp = parseInt(stringDate);
var dateObj = new Date(time);
var timeObj = new Object();
timeObj.date = dateObj;
timeObj.time = dateObj.getHours() + ':' + dateObj.getMinutes() + ':' + dateObj.getSeconds();
return timeObj;
}
$('#formHist').submit(function (e) {
e.preventDefault();
return false;
});