Description
OrglobalFxBOT Simple SSL V1.0
Tested on Renko
Telegram : @orglobalng
Logic: Takes and Close Trades by SSL flips
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.WCentralAfricaStandardTime, AccessRights = AccessRights.None)]
public class OrglobalFxBOT_Simple_SSL : Robot
{
[Parameter("Volume", DefaultValue = 1000)]
public double _Volume { get; set; }
[Parameter("Length", DefaultValue = 20)]
public int _length { get; set; }
[Parameter("MA Type", DefaultValue = MovingAverageType.Simple)]
public MovingAverageType _MAType { get; set; }
private SSLChannel _ssl;
protected override void OnStart()
{
_ssl = Indicators.GetIndicator<SSLChannel>(_length, _MAType);
}
protected override void OnBar()
{
if (_ssl._sslUp.HasCrossedAbove(_ssl._sslDown, 1))
{
Close(TradeType.Sell, "OrgSSL");
Open(TradeType.Buy, "OrgSSL");
}
else if (_ssl._sslUp.HasCrossedBelow(_ssl._sslDown, 1))
{
Close(TradeType.Buy, "OrgSSL");
Open(TradeType.Sell, "OrgSSL");
}
}
private void Close(TradeType tradeType, string Label)
{
foreach (var position in Positions.FindAll(Label, SymbolName, tradeType))
ClosePosition(position);
}
private void Open(TradeType tradeType, string Label)
{
var position = Positions.Find(Label, SymbolName);
if (position == null)
{
ExecuteMarketOrder(tradeType, SymbolName, 1000, Label);
}
}
}
}

orglobalng
Joined 03.03.2021
- Type: Free
- Language: C#
- Trading Platform: cTrader Automate
- Filename: OrglobalFxBOT_Simple_SSL.algo
- Rating: 0
- Downloads: 1283
Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Comments
Only logged in users can post a comment
Man, try that on heikin ashi bars.