Category Other  Published on 21/07/2024

BankniftyExpiry

Description

Testing


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.FullAccess, TimeZone = TimeZones.UTC)]
    public class NewcBot4 : Robot
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

        StreamWriter file = null;

        protected override void OnStart()
        {
            // To learn more about cTrader Automate visit our Help Center:
            // https://help.ctrader.com/ctrader-automate

            Print(Message);
            // Please email: jadmad0828@gmail.com to obtain the .algo file.
            file = new StreamWriter( @"C:\Downloads\tick.csv");
        }

        protected override void OnTick()
        {
            // Handle price updates here
            file.WriteLine(Server.Time.ToString("yyyy-MM-dd HH:mm:ss.fff")+","+Symbol.Bid+","+Symbol.Ask);
        }

        protected override void OnStop()
        {
            // Handle cBot stop here
            file.Close();
        }
    }
}


KE
keshavaapp

Joined on 21.07.2024

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: New cBot (4)_withSourceCode.algo
  • Rating: 0
  • Installs: 275
  • Modified: 21/07/2024 10:09
Comments
Log in to add a comment.
No comments found.