Commit e78e738d authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 12aa0459
...@@ -868,15 +868,23 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -868,15 +868,23 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if (data[i].side === 'LONG') { if (data[i].side === 'LONG') {
allLongDonePer = allLongDonePer + data[i].profit - 0.1 allLongDonePer = allLongDonePer + data[i].profit - 0.1
if (data[i].profit<=0.1)
{
lossLongDone++ lossLongDone++
lossLongDonePer=lossLongDonePer+(data[i].profit+-0.1) lossLongDonePer=lossLongDonePer+(data[i].profit+-0.1)
}
} }
else { else {
allShortDonePer = allShortDonePer + data[i].profit - 0.1 allShortDonePer = allShortDonePer + data[i].profit - 0.1
if (data[i].profit<=0.1)
{
lossShortDone++ lossShortDone++
lossShortDonePer=lossShortDonePer+(data[i].profit+-0.1) lossShortDonePer=lossShortDonePer+(data[i].profit+-0.1)
} }
}
if (data[i].profit>0.1) if (data[i].profit>0.1)
{ {
lossPlusDone++ lossPlusDone++
......
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