Replies

alifarooq
11 Nov 2014, 09:50

RE: RE: RE: RE:

Any plans for cuda or opencl support in near future?

Spotware said:

oktrader said:

Spotware said:

You can adjust number of CPU cores used for optimization: http://help.spotware.com/calgo/cbots/optimization#resources

That resource slider changes number of threads used for optimization. 100% value means that number of threads will be the same as number of cores.

 

Is cAlgo able to use HyperThreading technology? For example, like in this Intel Core i7-5820K. Or the resource slider just recognize physical cores?

It uses logical cores as well. You can note that resource slider allows you to change resources by fixed step. Number of steps is the number of cores.

 


@alifarooq

alifarooq
24 Oct 2014, 12:43

RE: RE: RE: RE: RE:

thanks

Invalid said:

//OpenConnection(); - this should be done in OnStart
string stm = "SELECT pid,hedge_level,current_upper_point,current_lower_point FROM " + logtable + " WHERE pid='" + position1.Label + "'";
using(MySqlCommand cmd1 = new MySqlCommand(stm, connection))
{
     using(var rdr = cmd1.ExecuteReader())
     {
         if (rdr.HasRows)
         {
            while (rdr.Read())
            {
                //currentHedgeLevel = rdr.GetInt32(1);
                currentupperpoint = Math.Round(rdr.GetDouble(2), 5);
                currentlowerpoint = Math.Round(rdr.GetDouble(3), 5);
            }
          }
     }
}
// CloseConnection(); - execute it in OnStop

 

alifarooq said:

OpenConnection();
                    string stm = "SELECT pid,hedge_level,current_upper_point,current_lower_point FROM " + logtable + " WHERE pid='" + position1.Label + "'";
                    MySqlCommand cmd1 = new MySqlCommand(stm, connection);
                    rdr = cmd1.ExecuteReader();
                    if (rdr.HasRows)
                    {
                        while (rdr.Read())
                        {
                            //currentHedgeLevel = rdr.GetInt32(1);
                            currentupperpoint = Math.Round(rdr.GetDouble(2), 5);
                            currentlowerpoint = Math.Round(rdr.GetDouble(3), 5);
                        }
                    }
                    CloseConnection();

can you tell how can i dispose this reader?

Invalid said:

Dispose DataReader when you exit from OnTick. Example:

  using(MySqlDataReader Reader = cmd.ExecuteReader()) 
  {
       // your cool stuff here
  }

 

alifarooq said:

When i execute the code this happens.

27/01/2014 00:20:02.471 | Crashed in OnTick with MySqlException: There is already an open DataReader associated with this Connection which must be closed first.

Spotware said:

Probably database is the bottleneck. You can try the following things:

  • Do not establish database connection on every query. Instead of that you can establish database connection in OnStart method and drop it in OnStop method
  • Install database on your machine, instead of connecting to remote one
  • Try other database engines. There is a chance that this problem is specific for mysql.

 

 

 

 

 


@alifarooq

alifarooq
24 Oct 2014, 12:28

RE: RE: RE:
OpenConnection();
                    string stm = "SELECT pid,hedge_level,current_upper_point,current_lower_point FROM " + logtable + " WHERE pid='" + position1.Label + "'";
                    MySqlCommand cmd1 = new MySqlCommand(stm, connection);
                    rdr = cmd1.ExecuteReader();
                    if (rdr.HasRows)
                    {
                        while (rdr.Read())
                        {
                            //currentHedgeLevel = rdr.GetInt32(1);
                            currentupperpoint = Math.Round(rdr.GetDouble(2), 5);
                            currentlowerpoint = Math.Round(rdr.GetDouble(3), 5);
                        }
                    }
                    CloseConnection();

can you tell how can i dispose this reader?

Invalid said:

Dispose DataReader when you exit from OnTick. Example:

  using(MySqlDataReader Reader = cmd.ExecuteReader()) 
  {
       // your cool stuff here
  }

 

alifarooq said:

When i execute the code this happens.

27/01/2014 00:20:02.471 | Crashed in OnTick with MySqlException: There is already an open DataReader associated with this Connection which must be closed first.

Spotware said:

Probably database is the bottleneck. You can try the following things:

  • Do not establish database connection on every query. Instead of that you can establish database connection in OnStart method and drop it in OnStop method
  • Install database on your machine, instead of connecting to remote one
  • Try other database engines. There is a chance that this problem is specific for mysql.

 

 

 


@alifarooq

alifarooq
24 Oct 2014, 12:09

RE:

When i execute the code this happens.

27/01/2014 00:20:02.471 | Crashed in OnTick with MySqlException: There is already an open DataReader associated with this Connection which must be closed first.

Spotware said:

Probably database is the bottleneck. You can try the following things:

  • Do not establish database connection on every query. Instead of that you can establish database connection in OnStart method and drop it in OnStop method
  • Install database on your machine, instead of connecting to remote one
  • Try other database engines. There is a chance that this problem is specific for mysql.

 


@alifarooq

alifarooq
24 Oct 2014, 12:02

Thanks i'll try that as i establish connection on every query.


@alifarooq

alifarooq
29 May 2014, 22:40

RE:

it depends on your brokers, most of them have limit 200 open positions. 

dlshield said:

I need to be able to have up to 10,000 positions open at all times on large accounts.  Does anyone have any experience with running a large number of open positions on cAlgo or cTrader?

 

 


@alifarooq

alifarooq
23 May 2014, 02:28

RE:

Spotware said:

No, it is not true. We are preparing new fancy features which you cannot find in legacy platforms. Stay tuned.

when this major update will be available?


@alifarooq

alifarooq
13 May 2014, 23:01

same here.


@alifarooq

alifarooq
27 Apr 2014, 06:47 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE: RE: RE:

 

 

cAlgoFx said:

alifarooq said:

breakermind said:

Hi,

I do not know just what to put as many small items instead of one large for long period. always comes out better, and do not need so often to make a decision which way. the same result can be achieved by one position.

Besides insert an image without code is like for me to make any sense.
On the other hand, if you score corresponds to not have to brag about:]

But always backtest everything looks good only in the real world there is no second chance : P (calgo, connection or robot can always suspend at one position always safer)

Bye.

my latest work.

Hello,

You forgot to include your broker's commissions.Keep working.

Happy huntingt

working on it. 


@alifarooq

alifarooq
26 Apr 2014, 07:34 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

breakermind said:

Hi,

I do not know just what to put as many small items instead of one large for long period. always comes out better, and do not need so often to make a decision which way. the same result can be achieved by one position.

Besides insert an image without code is like for me to make any sense.
On the other hand, if you score corresponds to not have to brag about:]

But always backtest everything looks good only in the real world there is no second chance : P (calgo, connection or robot can always suspend at one position always safer)

Bye.

my latest work.


@alifarooq

alifarooq
13 Apr 2014, 23:28

RE:

 

i am working on equity, any suggestions?

rkokerti said:

Hi,

You will lose your money without SL! Be careful!

Balance is nice, but you need to concentrate the Equity as well.

If Equity increases together with Balance, well, that's a good strategy.

Regards

 

 


@alifarooq