Commit 281ddf29 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 6a561bff
......@@ -611,7 +611,9 @@ function calculateRunnigTime(side, startTime, endTime, targetPrice) {
function grabData(start, end) {
let arr = []
let indexStart = false
for (let i = 0; i < candles.length; i++) {
let startIndex=(start -candles[0].t)/timeFrame
let endIndex=(end -candles[0].t)/timeFrame
for (let i = startIndex; i <= endIndex; i++) {
if (indexStart && candles[i].t <= end)
arr.push(candles[i])
......
......@@ -20,7 +20,10 @@ async function reaD() {
}
candles = arr
let d = calculateRunnigTime('LONG', 1547632800, 1577653500, 2.04)
// let d = calculateRunnigTime('LONG', 1547632800, 1577653500, 2.04)
// console.log(d)
let d= grabData(1547634300,1547635500)
console.log(d)
//
}
......@@ -49,7 +52,11 @@ function calculateRunnigTime(side, startTime, endTime, targetPrice) {
function grabData(start, end) {
let arr = []
let indexStart = false
for (let i = 0; i < candles.length; i++) {
let timeFrame=300
let startIndex=(start -candles[0].t)/timeFrame
let endIndex=(end -candles[0].t)/timeFrame
for (let i = startIndex; i <= endIndex; i++) {
if (indexStart && candles[i].t <= end)
arr.push(candles[i])
......
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