2018-05-22 10:11:50 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Core.Main;
|
|
|
|
|
using Core.Main.DataObjects;
|
|
|
|
|
using Core.Main.DataObjects.PTMagicData;
|
|
|
|
|
using Core.MarketAnalyzer;
|
|
|
|
|
|
|
|
|
|
namespace Monitor.Pages {
|
|
|
|
|
public class TickerWidgetsModel : _Internal.BasePageModelSecureAJAX {
|
|
|
|
|
public ProfitTrailerData PTData = null;
|
|
|
|
|
public List<string> MarketsWithSingleSettings = new List<string>();
|
|
|
|
|
|
|
|
|
|
public void OnGet() {
|
|
|
|
|
// Initialize Config
|
|
|
|
|
base.Init();
|
|
|
|
|
|
|
|
|
|
BindData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BindData() {
|
2018-12-29 04:58:40 +01:00
|
|
|
|
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
2018-05-22 10:11:50 +02:00
|
|
|
|
|
|
|
|
|
// Get markets with active single settings
|
|
|
|
|
foreach (string key in Summary.MarketSummary.Keys) {
|
|
|
|
|
if (Summary.MarketSummary[key].ActiveSingleSettings != null) {
|
|
|
|
|
if (Summary.MarketSummary[key].ActiveSingleSettings.Count > 0) {
|
|
|
|
|
MarketsWithSingleSettings.Add(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
MarketsWithSingleSettings.Sort();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|