GE
Topics
13 Aug 2019, 11:33
1604
6
Replies
GenesisG
13 Aug 2019, 12:38
Thanks for your response,
I have removed the onstop and onstart completely. But when refreshing in excel if excel and this bot read and write at the same time the cbot crashes still. I want this cbot to write to a text file. I have another bot writing to another text file. Then in excel I am importing both textfiles into the sheet and making calculations in excel.
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.IO;
namespace cAlgo.Robots
{
[Robot()]
public class ICMARKETS : Robot
{
StreamWriter _fileWriter;
protected override void OnTick()
{
var lastIndex = MarketSeries.Close.Count - 1;
double close = MarketSeries.Close[lastIndex - 1];
StreamWriter SW = new StreamWriter("C:\\Users\\Gary\\Desktop\\hi.txt");
SW.WriteLine(Symbol.Ask);
SW.WriteLine(Symbol.Bid);
SW.Close();
}
}
}
@GenesisG
GenesisG
13 Aug 2019, 12:47
RE:
Panagiotis Charalampous said:
Thanks!
@GenesisG