Replies

patrock333
20 May 2023, 23:47

RE:

YrpWayne said:

<PropertyGroup>
  <AlgoBuild>False</AlgoBuild>
</PropertyGroup>

Hope that helps someone else.

Thanks for this.

I couldn't find a solution anywhere to get rid of that error.

It took me a while to figure out how to add this to my csproj file, I'm new to C# and Visual Studio.

I just added it in C:\...\.nuget\packages\ctrader.automate\1.0.7\build\cTrader.Automate.targets.


@patrock333

patrock333
05 Jan 2021, 09:07

RE:

PanagiotisCharalampous said:

If the data series you are referring to are local to each cBot instance, then yes you will have multiple copies of it.
 

Thank you Panagiotis, that's what I thought.

 

        private void InitializeData()
        {
            TimeFrame tf = TimeFrame;
            price = MarketData.GetBars(tf);
            ma20 = Indicators.MovingAverage(price.ClosePrices, 20, MovingAverageType.Simple);
            ma200 = Indicators.MovingAverage(price.ClosePrices, 200, MovingAverageType.Simple);
            bb20 = Indicators.BollingerBands(price.ClosePrices, 20, 2, MovingAverageType.Simple);
            bb200 = Indicators.BollingerBands(price.ClosePrices, 200, 2, MovingAverageType.Simple);
        }

I was thinking of designing the cBots such that there will only be one instance of the Moving Average Indicator running and multiple cBots receiving data from it. One cBot may trade on a crossover of the 20-period moving average with the 200-period moving average. Another will trade if it does not. Other cBots will trade with different stop losses, etc. I have the same thought on trading using Bollinger Bands. One cBot trades in a regular manner, that is, when the price hits the top band it buys; when it hits the bottom it sells. Another cBot will do the opposite (contrarian trading). If this Bollinger Band uses a 20-period moving average then that will add to the number of stored data that are identical.

I tried nesting the above indicators in my own indicator to reduce identical data series (eg. the 20-period moving average in the ma20 and the bb20). However, wouldn't each cBot still create its own local copy of the indicator's data? The indicators are also instantiated in different time frames, hence, the concern over limitations in resources.

I may have to go back to getting an external named pipes server working...

I appreciate the help you have been providing Panagiotis. Thanks.


@patrock333

patrock333
29 Aug 2020, 05:28

RE: Using pipes.

PanagiotisCharalampous said:

Hi patrock333,

There are several ways you could achieve this like writing on a file or using pipes. You should select the best approach based on your own needs.

Best Regards,

Panagiotis 

Join us on Telegram

 

Hi Panagiotis.

Does cTrader impose any limitations on communication between cBots running on different accounts: 1) on the same computer running two instances of cTrader, or 2) on two different computers? I am trying to separate concerns for each cBot.


@patrock333

patrock333
25 Aug 2020, 10:16

RE:

Thanks for the quick reply Panagiotis.

I thought about writing to file but then the cbots would have to check the file constantly and I am concerned about time delays.

I wasn't aware of pipes for C#. I will read up on it.

 


@patrock333