Topics
18 Aug 2015, 02:09
 3012
 7
17 Jul 2014, 10:29
 3241
 5
Replies

MarsBarsLars
29 Aug 2015, 14:10

RE: RE:

Shot!

I'll give it a bash.

 

moneybiz said:

MarsBarsLars said:

Hi,

I'm running a Windows 2012 Server VM with 4GB of ram and 2 processors.

If I run 3 instances of cAlgo at the same time, they eventually consume all the RAM and the hard faults increase until each instance of cAlgo stops responding.

Are there any tips for managing memory?

Lars

I created a robot which periodically frees the excess memory.

Check here: Memory Manager Bot

 


@MarsBarsLars

MarsBarsLars
29 Aug 2015, 14:09

RE: RE:

Hi, yes 3 accounts running 3 algos each.

Paul_Hayes said:

MarsBarsLars said:

Hi,

I'm running a Windows 2012 Server VM with 4GB of ram and 2 processors.

If I run 3 instances of cAlgo at the same time, they eventually consume all the RAM and the hard faults increase until each instance of cAlgo stops responding.

Are there any tips for managing memory?

Lars

Hi Lars,

4 GB is very low for a Windows Server, I use 12 GB alone on my PC as I have charts open, but only 2 GB on my VM as I have 1 instance of cAlgo open with 4 robots running 5 instances each, so 20 instances running automated and I use just over 1 GB RAM.

Try not having the charts open in cAlgo, if you leave the screens maximized, the processor will be working drawing the screen and consuming RAM, so when you have finished fiddling with your settings, minimize all screens and see how much RAM is used with Task Manager.

Do you have 3 instances of cAlgo open as you have 3 accounts running?

 


@MarsBarsLars

MarsBarsLars
18 Mar 2015, 10:23

Hi,

Are there any brokers out there that offer cTrader PAMM accounts?


@MarsBarsLars

MarsBarsLars
06 Jan 2015, 09:43

Howzit!

Sometimes the connection is lost and the account stays disconnected.

Is there a way to reconnect while an algo is running?

Is it ok to have multiple connections to an account?

Thanks.

Lars.


@MarsBarsLars

MarsBarsLars
17 Jul 2014, 15:22

RE: RE: RE: RE:

 

You my friend, are a champion! Up and running. Thanks!

using Newtonsoft.Json;
using cAlgo.API;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class JSON : Robot
    {
        protected override void OnStart()
        {
            var position = ExecuteMarketOrder(TradeType.Sell, Symbol, 40000).Position;
            var json = JsonConvert.SerializeObject(position, Formatting.Indented);
            
        }
    }
}

 

will produce:

{
  "SymbolCode": "EURUSD",
  "TradeType": 1,
  "Volume": 40000,
  "Id": 2646492,
  "Profit": -2.66,
  "GrossProfit": -2.66,
  "EntryPrice": 1.35275,
  "EntryTime": "2014-07-17T11:16:25.942Z",
  "Pips": -0.9,
  "Label": "",
  "Comment": "",
  "StopLoss": null,
  "TakeProfit": null,
  "NetProfit": -5.06,
  "Swap": 0.0,
  "Commissions": -1.2
}

 

 

MarsBarsLars said:

 

Do you have a simple example?

 


@MarsBarsLars

MarsBarsLars
17 Jul 2014, 13:03

RE: RE:

 

Do you have a simple example?

Hi MarsBarsLars.

You can use this one http://james.newtonking.com/json. Just download and reference it using reference manager

or reference "System.Runtime.Serialization"  from .Net Framework. http://msdn.microsoft.com/en-us/library/bb410770(v=vs.100).aspx.

MarsBarsLars said:

Hi,

How do I include JSON serialization?

Is there an included library?

MarsBarsLars

 

 


@MarsBarsLars