Commit e78e738d authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

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