--
You received this message because you are subscribed to the Google Groups "NJ4X Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nj4x+uns...@googlegroups.com.
To post to this group, send email to nj...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I already tried that and also stripped all charts and history bars to its lightest, i took out anything that is using resources from the MT4.This only reduced RAM usage by almost a half, now RAM is around 38 MB but CPU same 10% and more.
--
I sent you log files.App is not connected on terminal, i used it only to run a terminal with custom template then i turn off app.So only that runs is that Server with 1 active terminal.
--
Here is a code that i am using in this simple app
using System.Configuration;using nj4x;using nj4x.Metatrader;
namespace nj4x_p1{ class Program { static void Main(string[] args) { //create strategy var mt4 = new Strategy(); long chartId = 0;
// connect to terminal server mt4.Connect( ConfigurationManager.AppSettings["terminal_host"], int.Parse(ConfigurationManager.AppSettings["terminal_port"]), new Broker(ConfigurationManager.AppSettings["broker"]), ConfigurationManager.AppSettings["account"], ConfigurationManager.AppSettings["password"] );
// user API methods if (mt4.IsConnectedToTerminal() == true) { // account connected Console.WriteLine($"Connected : Account {mt4.AccountNumber()}"); // open chart chartId = mt4.ChartOpen("AUDUSD", Timeframe.PERIOD_H4);
// if chart is opened, chart id is returned if chart is opened / loaded !!!!! if (chartId != 0) { Console.WriteLine("CHART OPENED, trying to load chart AUDUSD ... ");
var template_dir = "AUD_test EA_Q4A.tpl"; // path to custom template file if (mt4.ChartApplyTemplate(chartId, template_dir)) { Console.WriteLine("Template loaded SUCCESS !"); //Environment.Exit(0); // close script ! } else { Console.WriteLine("Template not loaded !"); }
} else { Console.WriteLine("Chart not opened"); } // open chart } else { Console.WriteLine("Not connected to terminal"); } Console.ReadLine(); }
}}
Same thing, cpu is over 25%
--