- Home
- Forum
- cTrader Automate
- Assembly must be Algo Type when building on VS 2022
Assembly must be Algo Type when building on VS 2022
Assembly must be Algo Type when building on VS 2022
Hello Ctrader Team, I'm tring to create a Dll file on Visual Studio 2022 that uses the cAlgo.API in the reference, cause i have multiple functions that need access to some properties like Account, HIstory, Positions and etc, but the thing is that the only error that i get is Assembly must be Algo type. I've made some research but didn't found any solution. I also tried some simple peace of code to what could it be like in this post https://ctrader.com/forum/cbot-support/1739?page=2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
namespace cAlgo
{
public class General
{
public static int GetPosCnt(Robot robot)
{
int iPosCnt;
iPosCnt = robot.Positions.Count;
return iPosCnt;
}
public static double GetLastCloseValue(Robot robot)
{
return robot.Bars.ClosePrices.LastValue;
}
}
}
Copyright © 2023 Spotware Systems Ltd. All rights reserved.