Symbol.Name of BTCUSD in Public Beta contains a Forward slash = BTC/USD
Symbol.Name of BTCUSD in Public Beta contains a Forward slash = BTC/USD
26 Jan 2021, 18:07
Hi,
The Symbol.Name of Crypto's in the Spotware Public Beta contains a forward slash.
IcMarkets and Pepperstone do not and no other pairs contain a forward slash that I have seen.
This is an issue for me because I use the Symbol.Name for file names and they can't contain symbols such as - & ! ? /
Can the naming convention please be standardized to not have Symbols?
Example code below:
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.UTC, AccessRights = AccessRights.None)]
public class SymbolName1 : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
protected override void OnStart()
{
// Put your initialization logic here
Print(Symbol.Name);
}
protected override void OnTick()
{
// Put your core logic here
}
protected override void OnStop()
{
// Put your deinitialization logic here
}
}
}
Replies
prosteel1
12 Mar 2021, 11:08
RE:
PanagiotisCharalampous said:
Hi prosteel1,
No it cannot be standardized since each broker can choose their own symbol names
Best Regards,
Panagiotis
Thanks for your reply, I used some code to remove the forward slash from
DataDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Documents\\cAlgo\\Sources\\Robots\\" + ToString() + "\\" + ToString();
string symbolname = String.Join("", Symbol.Name.Split('/'));
PathMLActionSec = DataDir + "\\MLActionSec-" + symbolname + ".csv";
File.CreateText(PathMLActionSec);
Seems to work by removing the / from the Symbol.Name
@prosteel1
PanagiotisCharalampous
27 Jan 2021, 08:46
Hi prosteel1,
No it cannot be standardized since each broker can choose their own symbol names
Best Regards,
Panagiotis
Join us on Telegram .
@PanagiotisCharalampous