AnnA paid
AnnA is a robust bot that was created with the assistance of an AI to trade even the most volatile market conditions to return a profit. AnnA uses math, market data, the right indicators along with current market conditions to execute trades.
AnnA was created specifically to trade XAU/USD but can be modified to trade various symbols including stocks, crypto, commodities etc. Anna is fully configured to trade a 10k account , your only tasks are as follows ; download and install AnnA, select the XAU/USD 1 min chart, ensure that the account is funded with 10k, initial quantity is set to1 lot and click play.
The option to trade on a 1 min versus 4hr chart produces significantly different result. The 1min adds a greater exposure risk but more than doubles the ROI of the safer 4hr chart see results of carts below of Jan to Dec .2022
AnnA can also be modified to trade mini and micro lots.
Trading on 1hr chart from Jan-Dec 2022
Trading 1min chart from Jan-Dec.2022
using System; using cAlgo.API; using cAlgo.API.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class DominantMartingale : Robot { [Parameter("Source")] public DataSeries Source { get; set; } [Parameter("Initial Quantity (Lots)", Group = "Volume", DefaultValue = 1 , MinValue = 1, Step = 1)] public double InitialQuantity { get; set; } [Parameter("Stop Loss", Group = "Protection", DefaultValue = 3000)] public int StopLoss { get; set; } [Parameter("Take Profit", Group = "Protection", DefaultValue = 1000)] public int TakeProfit { get; set; } [Parameter("SMA Period", DefaultValue = 14)] public int SmaPeriod { get; set; } [Parameter("SMA Period 6", DefaultValue = 6)] public int SmaPeriod6 { get; set; } [Parameter("SMA Period 150", DefaultValue = 150)] public int SmaPeriod150 { get; set; } private SimpleMovingAverage sma; private SimpleMovingAverage sma6; private SimpleMovingAverage sma150; protected override void OnStart() { Positions.Closed += OnPositionsClosed; sma = Indicators.SimpleMovingAverage(Source, SmaPeriod); sma6 = Indicators.SimpleMovingAverage(Source, SmaPeriod6); sma150 = Indicators.SimpleMovingAverage(Source, SmaPeriod150); } protected override void OnTick() { var sma6Current = sma6.Result.LastValue; var smaCurrent = sma.Result.LastValue; var sma150Current = sma150.Result.LastValue; if (sma6Current > smaCurrent && sma6Current > sma150Current && sma6Current > sma6.Result.Last(1) && sma6Current < sma.Result.Last(1)) { ExecuteOrder(InitialQuantity, TradeType.Buy); } else if (sma6Current < smaCurrent && sma6Current < sma150Current && sma6Current < sma6.Result.Last(1) && sma6Current > sma.Result.Last(1)) { ExecuteOrder(InitialQuantity, TradeType.Sell); } } private void ExecuteOrder(double quantity, TradeType tradeType) { if (Positions.Count >= 1) { Print("Maximum open trades reached. Not opening a new position."); return; } var volumeInUnits = Symbol.QuantityToVolumeInUnits(quantity); var result = ExecuteMarketOrder(tradeType, SymbolName, volumeInUnits, "AnnA.10k", StopLoss, TakeProfit); if (result.Error == ErrorCode.NoMoney) { Stop(); } } private void OnPositionsClosed (PositionClosedEventArgs args) { var position = args.Position; if (position.Label != "AnnA.10K" || position.SymbolName != SymbolName) return; if (position.GrossProfit < 0) { if (InitialQuantity ==1) // check if initial trade size is still at default value { InitialQuantity = 1; // increase the initial trade size to 20 for the next trade } else { InitialQuantity = InitialQuantity*1 ; // double the lot size for each successive trade that is lost } } else { InitialQuantity = 1; // reset initial trade size to default value when a trade is won } } }}

If it is paid for, why show the code?

Hello,
Thanks for uploading this bot. Just a small error that i spotted in the OnPositionsClosed() event
if (InitialQuantity == 1) // check if initial trade size is still at default value
{
InitialQuantity = 1; // increase the initial trade size to 20 for the next trade
}
else
{
InitialQuantity = InitialQuantity *1; // double the lot size for each successive trade that is lost
}
I would code the above if statement as follows
if (InitialQuantity == 1) // check if initial trade size is still at default value
{
InitialQuantity += Symbol.VolumeInUnitsStep;
}
else
{
InitialQuantity *= 2.0; // double the lot size for each successive trade that is lost
}
What do you reckon?