This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool _isLiked; | |
public void Handle_OnClick(object sender, EventArgs e) | |
{ | |
var animation = ((AnimationView)sender); | |
if (_isLiked) | |
{ | |
_isLiked = false; | |
animation.PlayFrameSegment(0, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb shell setprop log.tag.FA VERBOSE | |
adb shell setprop log.tag.FA-SVC VERBOSE | |
adb logcat -v time -s FA FA-SVC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task Process() | |
{ | |
// Get our current trades. | |
var activeTrades = GetCurrentTrades(); | |
foreach (var trade in activeTrades) | |
{ | |
// Check the exchange to see if we have a buy/sell order open for this trade. | |
var orders = GetOpenOrders(trade.Market); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static List<double?> Sma(this List<double> source, int period = 30) | |
{ | |
int outBegIdx, outNbElement; | |
double[] smaValues = new double[source.Count]; | |
List<double?> outValues = new List<double?>(); | |
var sma = TA.Library.Core.Sma(0, source.Count - 1, source.ToArray(), period, out outBegIdx, out outNbElement, smaValues); | |
if (sma == TA.Library.Core.RetCode.Success) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SmaCrossover : ITradingStrategy | |
{ | |
public string Name => "SMA Crossover"; | |
public List<Candle> Candles { get; set; } | |
public SmaCrossover() | |
{ | |
this.Candles = new List<Candle>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private SellType ShouldSell(Trade trade, double currentRateBid, DateTime utcNow) | |
{ | |
var currentProfit = (currentRateBid - trade.OpenRate) / trade.OpenRate; | |
if (currentProfit < Constants.StopLossPercentage) | |
return SellType.StopLoss; | |
// Check if time matches and current rate is above threshold | |
foreach (var item in Constants.ReturnOnInvestment) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = MauiApp.CreateBuilder(); builder.UseMauiApp<App>() | |
#if __ANDROID__ | |
.ConfigureMauiHandlers(handlers => | |
{ | |
handlers.AddCompatibilityRenderer(typeof(Microsoft.Maui.Controls.BoxView), typeof(MyBoxRenderer)); | |
#endif | |
}); | |
return builder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if __ANDROID__ | |
Microsoft.Maui.Handlers.ButtonHandler.ButtonMapper["MyCustomization"] = (handler, view) => | |
{ | |
handler.NativeView.SetBackgroundColor(Android.Graphics.Color.Green); | |
}; | |
#endif | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Maui; | |
using Microsoft.Maui.Hosting; | |
public static class MauiProgram | |
{ | |
public static MauiApp CreateMauiApp() | |
{ | |
var builder = MauiApp.CreateBuilder(); | |
builder | |
.UseMauiApp<App>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Maui; | |
using Microsoft.Maui.Controls; | |
public partial class App : Application | |
{ | |
public App() | |
{ | |
InitializeComponent(); | |
MainPage = new MainPage(); | |
} |
NewerOlder