Topics
Replies
suradi
21 Jan 2018, 13:17
RE:
Thank you! This should get me started
Panagiotis Charalampous said:
Hi Surady,
See below a very simple example on how to calculate your average equity with samples taken on each bar change.
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class AverageEquity : Robot { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } private double _equity; private double _periodCount; protected override void OnStart() { ExecuteMarketOrder(TradeType.Buy, Symbol, 10000); } protected override void OnBar() { _equity += Account.Equity; _periodCount++; Print("Average Equity:" + (_equity / _periodCount)); } protected override void OnStop() { // Put your deinitialization logic here } } }If you need something more complicated or any professional help in developing your cBot, you can post a Job or contact a professional Consultant.
Best Regards,
Panagiotis
suradi
23 Feb 2017, 13:06
( Updated at: 21 Dec 2023, 09:20 )
RE:
trend_meanreversion said:
This week was definitely tough for strategy but despite having drawdowns , it came victorious !!
Target hit for the week already ( 500$ or 10% ) :)
Next week or probably next , i am going live .
Looks great trend. Will you be posting a copy of your martingale cbot so we can test it out ? :)
suradi
06 Feb 2018, 12:31
This should get you started with perceptrons :)