Convert String to Symbol - Error CS0118: 'cAlgo.API.Internals.Algo.Symbol' is a 'property' but is used like a 'type'
Convert String to Symbol - Error CS0118: 'cAlgo.API.Internals.Algo.Symbol' is a 'property' but is used like a 'type'
12 Nov 2013, 19:46
I am writing the following routine in my robot
public List<order> getModelOrders(string portfolioName, bool islong)
{
var modelPortfolioOptions = new List<Tuple<string, string, TradeType, bool, bool>>();
var modelOrders = new List<order>();
Symbol pair;
TradeType trade;
bool isCarry;
Tuple<string, string, TradeType, bool, bool>[] allPortfolioOptions =
{
Tuple.Create("AUD", "AUDCAD", TradeType.Buy, true, false)
}
pair = MarketData.GetSymbol(option.Item2);
Error CS0118: 'cAlgo.API.Internals.Algo.Symbol' is a 'property' but is used like a 'type'
Replies
jhtrader
13 Nov 2013, 18:09
I figured this one out!!
fzlogic said:
It looks like you're putting the code in the wrong place. Can you provide more code?
The problem was the way I was referencing the class.. I did not declare it as a Robot so it could not use the things like Symbols..
This fixed it..
[Robot()]
public class Portfolio : Robot
{
}
fzlogic
13 Nov 2013, 15:20
It looks like you're putting the code in the wrong place. Can you provide more code?
@fzlogic