Commit 37a3ddbf authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 6f228dda
...@@ -694,7 +694,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -694,7 +694,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
sideString = sideString + data[i].side + '_' sideString = sideString + data[i].side + '_'
} }
canCreateRunupPercent = false canCreateRunupPercent = false
runBefore = true // runBefore = true
let obj let obj
if (step === 0) { if (step === 0) {
// unixStart = data[i].unixOpen // unixStart = data[i].unixOpen
...@@ -859,6 +859,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -859,6 +859,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
total++ total++
} else { } else {
runBefore = false
profitLossString = profitLossString + data[i].profit + '_' profitLossString = profitLossString + data[i].profit + '_'
lossDone++ lossDone++
......
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
let t='-1.42_-1.4_-2.51_-2.09_-2.61_-1.98_-1.18_-0.91_-0.78_-0.45_-1.87_-2.22_-2.69_-2.4_-1.73_-1.79_-4.66_-2.36_-3.09_-3.03_-7.78_-9.95_-3.41_-4.93_-2.35_-1.67_-3.76_-3.19_-3.29_-1.16_-0.33_-0.13_-3.36_-5.37_-3.14_-3.57_-2.6_-3.28_-3.9_-3.42_-1.61_-1.72_-2.3_-2.19_-3.15_-4.05_-3_-2.05_-2.31_-2.91_-2.35_-0.57_-0.84_-6.88_-3.13_-1.5_-3.12_-0.12_-2.11_-1.96_-1.35_-3.28_-1.17_-1.27_-1.06_-1.28_-2.48_-1.54_-1.01_-1.41_-3.53_-2.06_-3.14_-1.74_-0.94_-2.1_-2.6_-2.55_-4.19_-2.08_-2.14_-2.31_-1.55_-0.37_-3.35_-1.76_-1.08_-0.98_-0.47_-1.28_-0.4_-0.97_-1.08_-0.85_-1.61_-3.93_-0.65_-2.91_-1.1_-0.64_-1.58_-3.5_-2.78_-1.95_-3.19_-6.15_-3.36_-4.63_-3.8_-1.34_-2.78_-3.29_-3.59_-2.83_-0.72_-0.65_-3.84_-0.51_-0.65_-1.4_-0.96_-1.32_-1.75_-2.34_-1.56_-1.28_-1.21_-0.83_-0.06_-1.33_-1.63_-1.61_-1.58_-1.01_-1.38_-1.61_-1.5_-0.73_-0.95_-0.35_-0.94_-2.96_-0.89_-1.66_-1.27_-1.23_-1.07_-1.46_-4.39_-2.5_-2.11_-2.93_-0.92_-1.26_0.2_-0.42_-1.97_-2.89_-3.56_-1.57_-1.87_-2.8_-1.75_-2.57_-1.47_-2.2_-1.27_-1.55_0.04_-1.13_-0.35_-2.02_-2.93_-2.73_-1.14_-1.55_-0.88_-1.29_-2.56_-0.76_-1.31_-1.19_-1.48_-0.02_-1.19_-2.8_-1.94_-1.78_-0.75_-1.96_-0.62_0.01_-1.91_-0.8_-0.21_-1.07_0.1_-0.26_-1.81_-4.28_-1.1_-1.62_-1.27_-2.86_-1.65_-0.38_-0.28_0.66_-0.74_-1.67_-2.46_-1.21_-1_-2.71_-1.41_-4.37_-3.17_-2.53_-2.06_-2.36_-3.3_-8.76_-8.87_-5.07_-1.58_-0.2_-0.88_-2.69_-0.57_-1.32_-2.33_-1.49_-5.04_-2.43_-0.5_-2.89_-2.33_-1.48_-1.16_-0.66_-0.35_-1.33_-0.69_-1.03_0_-0.45_-0.24_-1.82_-0.99_-1.65_0.28_-0.64_-1.39_-0.41_-1.09_-2.17_-1.66_-0.76_-0.63_-1.86_-1.85_-2.08_-2.57_-1.81_-4.21_-2.67_-2.47_-0.83_-2_-1.59_0.43_-1.55_-1.29_-1.79_-1.16_-3.39_-0.51_-1.09_-0.42_-0.66_-0.8_-1.63_-1.28_-2.48_-2.26_-0.3_-2.46_-5.07_-3.47_-4.48_-3.11_-2.24_-2.48_-2.36_-1.62_-1.89_-2.61_-1.49_-1.73_-1.12_-9.2_-6.67_-4.86_-3.43_-6.03_-1.81_-0.85_-2.45_-2.57_-5.14_-3.53_-2.97_-1.79_-2.81_-0.73_-2.56_-1.41_-1.72_-6.02_-4.32_-4.6_-2.41_-4.01_-2.16_-2.95_-2.17_-0.84_-3.17_-2.88_-1.96_-2.09_-2.73_-1.2_-3.73_-1.36_-2.4_-2.9_-2.86_-4.38_-1.58_-2.66_-1.74_-1.82_-1.82_-2.06_-2.24_-1.03_-2.23_-1.66_-3.92_-3.78_-3.3_-2.95_-1.02_-1.62_-0.86_-1.62_-1.41_-1.58_-1.66_-1.27_-2.75_-1.48_-1.57_-1.33_-2.36_-2.5_-1.91_-1.44_-1.53_-0.92_-1.38_-1.15_-1.7_-4.69_-4.55_-3.55_-4.17' let t='-4.17_33.76_-3.34_3.15_-3.23_-4.16_-0.47_-7.38_-7.73_-2.26_-2.8_69.62_8.13_-3.41_-4.63_-2.29_-2.8_51.81_-14.18_-10.7_-7.7_5.19_16.51_-7.71_-8.78_-1.46_-6.18_-5.72_-0.22_-2.62_-6.76_0.59_-5.51_-4.42_17.28_-7.02_-1.71_-2.95_-2.53_-0.45_-1.52_7_-3.72_-3.36_6.43_1_-1.68_-1.6_-0.34_-0.46_-0.7_-0.92_-0.39_-1.34_14.1_-3.42_20.82_-0.75_27.25_-3.27_1.39_3.14_-0.78_50.16_-7.84_-6.6_-3.99_5.73_-0.09_11.54_-3.19_-1.84_-1_-3.32_-3.15_-1.51_-1.16_-2.52_1.7_-3.67_-4.3_-2.05_-0.23_-2.02_-1.56_-1.19_17.79_1.23_-2.39_-2.66_-3.25_-0.67_-2.08_-1.3_-1.39_-1.23_16.13_-3.3_-4.34_-3.61_-1.85_-1.16_-3.46_2.19_9.92_-3.65_0.13_2.14_-1.74_-0.96_-1_-0.85_-0.26_-0.83_-3.28_-2.06_6.67_-1.23_-0.96_6.25_-0.61_-0.78_-1.16_-1.33_-2.37_-0.91_-0.17_-0.97_-0.7_-0.46_-0.54_-1.41_35.3_-1.99_-1.99_-4.3_-5.49_-1.96_1.02_-2.58_1_-1.95_-0.74_-1.19_-0.94_0.81_-0.97_0.79_-1.18_-0.9_32.13_6.59_-0.32_-1.84_-3.39_8.4_-0.07_-4.65_-2.08_-1.52_-3.08_0.81_-1.32_-2.12_0.12_-2.31_-1.87_-0.1_-0.89_-0.11_-0.38_-0.6_6.92_1.18_-1.49_-0.79_-0.47_-1.28_0.74_-0.88_1.07_-1.48_-2.24_-1.93_-0.64_0.02_2.66_-0.01_-0.86_5.11_-1.27_-0.77_-0.07_-0.32_-0.62_-1.32_-1.09_-1.59_42.92_-1.5_-1.54_-2.13_26.51_-0.42_-0.24_-1.35_-1.97_40.78_-4.05_3.45_-2.81_-1.86_-0.69_13.1_-0.26_-1.27_13.68_-2.59_0.64_-2.83_1.86_-2.05_0.1_-0.37_6.18_-1.41_-1.15_-1.88_-1.48_-0.24_-0.59_-0.72_-0.98_-0.85_-0.56_11.79_-1.36_15.89_3.8_-0.66_2.83_-0.15_-4.26_-0.82_-0.5_-1.46_-0.04_1.4_-1.38_-1.03_-0.91_-0.61_-1.17_-1.27_0.57_-0.5_0.28_3.39_-0.88_19.3_1.5_-2.87_-1.25_3.77_-0.35_-0.51_4.6_-0.15_1.1_-0.28_-0.95_0.46_-1.81_0.06_-0.38_-1.38_-1.36_1.9_-1.81_44.54_-0.43_-0.43_-2.62_3.64_-1.2_-1.29_-1.81_-1.62_5.53_-0.81_1.07_-2.32_-1.71_8.72_-1.43_17.94_1.04_-1.65_3.93_-0.6_23.76_-1.34_-2.26_-2.03_-1.1_-3.39_-1.31_-1.2_-1.2_-3.88_-0.16_-0.93_-2.2_-1.98_-1.22_7.19_-1.28_-2.02_5.08_-0.69_10.4_0.66_0.3_0.33_-0.23_-2.22_-2.29_-1.54_-0.38_-0.63_8.77_-0.56_-0.74_2.28_0.19_-2.43_-0.98_2.92_-1.92_-1.94_-0.48_-0.27_-1.29_16.7_17.22_-2.78_-2.37_-1.9_-1.56_-0.47_-1.95_-0.46_-0.44_-1.11_-1.35_-1.06_-0.63_3.6_-1.19_-1.61_-1.27_-1.33_2.94_-1.32_3.38_8.54_-1.45_-1.78_-0.8_-1.16_-1.74_-0.8_-0.67_1.86_-1_-1.26_-0.37_-0.48_0.46_-0.93_-0.28_-0.88_17.14_0.7_1.48_-2.37_-1.44_-1.11_-1.29_-0.88_-0.82_-0.11_12.65_-0.31_0.48_-1.57_-1.01_2.18_-1.05_-0.73_-0.66_-1.68_-2.17_5.03_-1_1.82_-1.15_15.36_-0.63_-1.65_-0.81_55.58_-0.86_-0.92_-1.81_-1.72_-1.26_-0.92_-1.21_-0.98_11.94_-1.21_-0.53_0.75_46.8_4.84_-2.14_-2.93_-4.73_1.89_-1.33_-1.54_-3.08_-2.59_-0.99_-0.34_2.46_-1.1_-1.48_22.42_1.45_-4.2_-3.88_-2.35_-2.16_-1.45_-4.98_3.69_-2.36_18.57_-1.42_-1.58_-0.39_-2.51_-2.14_-4.2_-3.54_-8.02_-0.39_9.96_1.89_-1.52_-2.41_-1.37_0.15_15.78_-0.26_1.59_-0.93_0.12_-0.49_-0.12_3.72_-1.25_0.91_-0.58_-2.19_-0.54_1.98_-0.56_-0.46_-1.37_-1.65_-0.65_-0.42_-0.82_-0.36_-0.79_-1.59_4.19_-1.22_-0.73_-0.76_-0.44_-0.79_-0.88_1.47_-0.68_-1.43_-0.89_-1.03_59.42_-1.78_-0.46_-0.37_7.35_-1.96_1.19_6.68_-2_-1.07_-2.51_-1.53_3.82_13.8_2.4_-2.86_-0.11_-0.2_-1.16_-1.46_-0.54_-0.77_1.74_-1.71_-0.92_9.3_2.64_-1.28_-1.44_-1.15_-0.77_0.76_-0.59_0.02_7.75_-0.75_-3.18_-1.77_-1.12_-2.25_5.58_-0.75_-2.03_1.66_-0.42_-1.71_-2.01_-1.44_-1.85_-3.85_14.87_-1.32_-1.06_-0.5_15.7_2.55_12.66_-1.91_-1.86_3.42_12.14_-0.58_-2.95_2.08_83.58_0.6_13.06_-1.12_0.9_-4.7_-3.66_-1.97_-1.57_-1.07_2.19_-1.42_18.89_-2.09_4.88_-2.01_1_-2.93_-4.02_-2.22_4.61_9.31_-5.72_6.07_-0.98_-3.39_-1.95_-2.27_12.61_-1.68_-0.4_-1.79_0.42_-0.4_-1.57_-2.52_-2.95_-3.02_-1.98_-0.62_0.11_6.01_-0.97_-2.3_17.18_-1.07_14.29_2.66_-4.28_-4.2_-2.63_-4.84_-1.5_-2.4_-4.21_-3.86_-3.78_-3.79_66.35_-2.76_-4.46_33.79_6.73_6.16_5.38_-3.78_-4.03_-2.62_-0.94_-2.7_-2.63_-1.77_-3.99_2.88_-1.41_22.29_6.77_-2.28_6.65_11.89_-3.85_0.82_31.28_-1.64_-0.47_-3_17.34_-4.85_-1.52_-2.28_-0.96_-2.04_-2.35_0.6_-0.19_-2.36_-0.1_-0.66_-2.39_-2.19_-1.26_-1.13_-0.92_-1.82_15.61_6.39_-1.98_-1.6_-1.96_0.43_-3.1_-2.07_-3.62_-1.9_1.65_-2.28_-1.96_-1.23_-0.5_9.72_-6.34_-3.45_-3.02_-1.42_19.93_-1.02_-2.87_-3.66_-2.39_-0.75_-1.02_-2.48_13.32_-2.29_2.07_-2_-2.07_-1.93_3.64_-1.79_-1.59_-0.95_-0.74_-0.8_-1.03_-1.89_0.17_-2.56_-0.22_-1.77_-2.62_-1.13_-0.82_-0.9_-1.58_-1.66_-1.41_7.25_-0.98_-1.79_-2.06_-2.57_-4_-0.62_3.89_2.89_-3.43_-3.49_-1.18_0.4_-1.96_0.25_-3.01_-0.22_-1.17_-2.05_-2.03_-2.84_-2.39_-1.9_0.69_-1.22_-0.27_-0.43_-0.77_6.24_-0.84_-2.2_-1.68_-1.25_-0.71_15.59_2.14_-1.9_-1.45_-0.5_-0.63_-2.11_-2.67_0.19_-1.7_18.94_-2.77_0.4'
let f=t.split('_') let f=t.split('_')
let arr=[] let arr=[]
for (let i=0;i<f.length;i++) let sum=0
if (parseFloat(f[i])>0.1) for (let i=0;i<f.length;i++) {
arr.push(f[i]) console.log(parseFloat(f[i]))
console.log(arr) sum = sum + parseFloat(f[i])
\ No newline at end of file }
console.log(f.length)
console.log(sum / f.length)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment