commit
6af375d87c
|
@ -1642,17 +1642,6 @@ namespace Core.Main
|
|||
// Calculate average market change, skip any that are outside the threshold if enabled
|
||||
if (trendThreshold.TrendThreshold != 0)
|
||||
{
|
||||
// Exclude trends outside the threshhold.
|
||||
var excludedMarkets = from m in marketTrendChanges
|
||||
where m.TrendChange > trendThreshold.TrendThreshold || m.TrendChange < (trendThreshold.TrendThreshold * -1.0)
|
||||
orderby m.Market
|
||||
select m;
|
||||
|
||||
foreach (var marketTrend in excludedMarkets)
|
||||
{
|
||||
this.Log.DoLogInfo(String.Format("SMS Off Trigger for '{0}' is ignoring {1} for exceeding TrendThreshold {2}% with {3}% on {4}", marketSetting.SettingName, marketTrend.Market, (double)trendThreshold.TrendThreshold, Math.Round(marketTrend.TrendChange, 3, MidpointRounding.ToEven), offTrigger.MarketTrendName));
|
||||
}
|
||||
|
||||
var includedMarkets = from m in marketTrendChanges
|
||||
where m.TrendChange <= trendThreshold.TrendThreshold && m.TrendChange >= (trendThreshold.TrendThreshold * -1.0)
|
||||
orderby m.Market
|
||||
|
@ -1856,17 +1845,6 @@ namespace Core.Main
|
|||
// Calculate average market change, skip any that are outside the threshold if enabled
|
||||
if (trendThreshold.TrendThreshold != 0)
|
||||
{
|
||||
// Exclude trends outside the threshhold.
|
||||
var excludedMarkets = from m in marketTrendChanges
|
||||
where m.TrendChange > trendThreshold.TrendThreshold || m.TrendChange < (trendThreshold.TrendThreshold * -1.0)
|
||||
orderby m.Market
|
||||
select m;
|
||||
|
||||
foreach (var marketTrend in excludedMarkets)
|
||||
{
|
||||
this.Log.DoLogInfo(String.Format("SMS Trigger for '{0}' is ignoring {1} for exceeding TrendThreshold {2}% with {3}% on {4}", marketSetting.SettingName, marketTrend.Market, (double)trendThreshold.TrendThreshold, Math.Round(marketTrend.TrendChange, 3, MidpointRounding.ToEven), trigger.MarketTrendName));
|
||||
}
|
||||
|
||||
var includedMarkets = from m in marketTrendChanges
|
||||
where m.TrendChange <= trendThreshold.TrendThreshold && m.TrendChange >= (trendThreshold.TrendThreshold * -1.0)
|
||||
orderby m.Market
|
||||
|
|
|
@ -278,8 +278,16 @@ else
|
|||
if (mps.MarketTrendChanges.ContainsKey(marketTrend.Name)) {
|
||||
marketTrendsDisplayed++;
|
||||
string trendChangeOutput = mps.MarketTrendChanges[marketTrend.Name].ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
||||
if ((mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) || (mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) )
|
||||
{
|
||||
<td class="text-right text-autocolor-saw"><i class="fa fa-ban text-muted" data-toggle="tooltip" data-placement="top" title="This coin has been excluded from the average market trend on this timeframe due to your Threshold setting."></i> @trendChangeOutput%</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td class="text-right text-autocolor-saw">@trendChangeOutput%</td>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@for (int i = 0; i < marketTrends.Count - marketTrendsDisplayed; i++) {
|
||||
<td></td>
|
||||
|
|
|
@ -160,11 +160,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Aggregate totals
|
||||
double bagGain = (profitPercentage / 100) * dcaLogEntry.TotalCost * leverageValue;
|
||||
Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost;
|
||||
Model.TotalBagGain = Model.TotalBagGain + bagGain;
|
||||
|
||||
// Render the row
|
||||
<tr @(lostValue ? "class=errorRow" : "") >
|
||||
<!-- Market -->
|
||||
|
@ -226,20 +221,25 @@
|
|||
{
|
||||
<td class="text-left"></td>
|
||||
}
|
||||
|
||||
<!-- Profit -->
|
||||
@if (!@lostValue)
|
||||
{
|
||||
profitPercentage = profitPercentage * leverageValue;
|
||||
<td class="text-autocolor">@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td class="text-left">No Value!</td>
|
||||
}
|
||||
|
||||
<!-- Bag details -->
|
||||
<td class="text-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/BagDetails/?m=@dcaLogEntry.Market" data-remote="false" data-toggle="modal" data-target="#dca-chart"><i class="fa fa-plus-circle"></i></a></td>
|
||||
</tr>
|
||||
{
|
||||
// Aggregate totals
|
||||
double bagGain = (profitPercentage / 100) * dcaLogEntry.TotalCost;
|
||||
Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost;
|
||||
Model.TotalBagGain = Model.TotalBagGain + bagGain;
|
||||
}
|
||||
}
|
||||
<td>Totals:</td>
|
||||
<td></td>
|
||||
|
|
|
@ -77,6 +77,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-form-label">Trend Threshold <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="Exclude coins above/below this value when calculing market trend average."></i></label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="MarketAnalyzer_MarketTrend_@(Model.MarketTrendName)|TrendThreshold" value="@Model.MarketTrend.TrendThreshold.ToString()">
|
||||
<span class="help-block"><small>Leave empty to exclude none</small></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-form-label">Display Graph <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="Displays or hides the graph for this trend on the dashboard of your PT Magic monitor."></i></label>
|
||||
<div class="col-md-8">
|
||||
|
|
Loading…
Reference in New Issue