Commit 4e88ce84 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 7198fcfb
......@@ -20,7 +20,7 @@ run()
async function run()
{
let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3,risk:1,start:2000,pfTrade:2,side:'both',riskFreeLevel:100,onlyShortLong:false,loss:0}
let obj={sort:'profitPerMonthDrawDown',alocatedReserve:3,alocatedReserveCompound:3,risk:1,start:2000,pfTrade:2,side:'both',riskFreeLevel:100,onlyShortLong:false,loss:0,level:200}
let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv&zarib param:1.1 base:200 target:1']
obj.detail=detail
let all=[]
......
......@@ -120,7 +120,7 @@ async function run() {
// createfileADV('allocatedReservePerMonthUnder2', JSON.stringify(arr20MaxNew, null, 2))
// createfileADV('allocatedReserveCompoundUnder2' , JSON.stringify(arrReservCompoundNew, null, 2))
startAgain(arr, configs.start)
startAgain(arr, configs.start,configs.level)
// generateBaseDrawDown(arr2)
// generateDrawDownBaseStart(arr2,configs.start)
console.log('Done')
......@@ -247,7 +247,7 @@ async function generateDrawDownBaseStart(arrLast,start)
}
async function startAgain(arr, start) {
async function startAgain(arr, start,level) {
let count = 0
let arr2 = []
let arr3 = []
......@@ -255,7 +255,7 @@ async function startAgain(arr, start) {
let inline = arr[i]
inline = _.without(inline, undefined, null);
for (let j = 0; j < inline.length; j++) {
if (inline[j].maxAllocatedMoney < start)
if (inline[j].maxAllocatedMoney < start && inline[j].maxLevel < level)
arr2.push(inline[j])
......
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