Taking too long (5 mins) to load Daily Initial Open Price

Created at 11 Dec 2015, 21:07
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
GoldnOil750's avatar

GoldnOil750

Joined 07.04.2015

Taking too long (5 mins) to load Daily Initial Open Price
11 Dec 2015, 21:07


Hi,

I am trying to get the Daily initial Open Price of the 48-pairs.  And it takes around 5 mins to load the values in the array.  Is there any other way to do it faster ??  

the below function is called "OnBar"  and not "On_tick".

Thank you.  

 

 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////                                               Load_All_Symbol_Daily_Open_Price                               ///////////////////////////////
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private void Load_All_Symbol_Daily_Open_Price()
        {
            //FIRST LOOP FOR 8 MAJOR PAIRS
            for (int i = 0; i < 7; i++)
            {
                //SECOND LOOP FOR 7 INDIVIDUAL PAIRS PER MAJOR PAIR
                for (int j = 0; j < 6; j++)
                {
                    //GET SYMBOL FROM THE FUNCTION "Get_EUR_Symbol(i)"
                    Current_Symbol = Get_Symbol(i, j);
                    //CONVERT SYMBOL CODE TO STRING
                    str_Current_Symbol = Current_Symbol.Code.ToString();
                    Current_Symbol_PipSize = Current_Symbol.PipSize;

                    //GET DAILY OPEN PRICES FOR THE SYMBOL
                    var t1 = MarketData.GetSeries(str_Current_Symbol, TimeFrame.Daily);
                    //STORE THE OPEN.LAST VALUE IN THE ARRAY.  ARRAY STARTS FROM 0 INDEX
                    Daily_Price_Open[i, j] = t1.Open.LastValue;

                    //PRINT THE VALUE IN LOG
                    Print(i + "." + j + "          Daily Open Price " + str_Current_Symbol + "    =    " + Daily_Price_Open[i, j]);
                }
                //END for(int j=1; j<7; j++)

                //PRINT BLANK LINE
                Print("");
            }
            //END for(int i=1; i<8; i++)
        }
        //END FUNCTION Load_All_Symbol_Daily_Open_Price

 


@GoldnOil750
Replies

Spotware
14 Dec 2015, 22:11

Dear Trader,

We would like to inform you that we do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You can contact one of our Partners or post a job in Development Jobs section for further coding assistance.


@Spotware

GoldnOil750
15 Dec 2015, 10:19

RE:

Spotware said:

Dear Trader,

We would like to inform you that we do not provide coding assistance services. We more than glad to assist you with specific questions about cAlgo.API. You can contact one of our Partners or post a job in Development Jobs section for further coding assistance.

 

Hi,

But can u help identify any other API which can help get the Market Prices a little faster.  Like every time when I run the above code it takes 5 mins to just load the price from server.

 

can you help in identifying any other API ??  will explore it myself.  will be much appreciated. thank you.

 

///S.Khan


@GoldnOil750

@fxstarforex
16 Dec 2015, 14:30

RE: RE:

This post was removed by moderator.

 


@@fxstarforex

ClickAlgo
16 Dec 2015, 21:37

I bet your time-frame is 5 minutes, put a print hello in your method before the for-next statements, so before any processing starts.

You should see the hello displayed in the log file after 5 minutes and this should give you a clue as to what your problem is.

 

 


@ClickAlgo

GoldnOil750
16 Dec 2015, 22:03

RE:

Paul_Hayes said:

I bet your time-frame is 5 minutes, put a print hello in your method before the for-next statements, so before any processing starts.

You should see the hello displayed in the log file after 5 minutes and this should give you a clue as to what your problem is.

 

 

 

No, i am using the 1-min chart and the problem is on first time to load the values; around good 5 mins.  then once loaded it goes very smooth.  Like in mt4 it gets the data very fast, like within 10 seconds but in cTRADER it is super slow and not to mention you cannot backtest on multiple symbol at the same time.  People are asking for this for the last 2 years.

 

anyways, u know of any other API which can help in loading the open prices faster ?  my code is pasted on the top post.


@GoldnOil750

ClickAlgo
16 Dec 2015, 23:39

can you show me the code for the Get_Symbol(i, j); method 


@ClickAlgo

GoldnOil750
17 Dec 2015, 12:45

RE:

Paul_Hayes said:

can you show me the code for the Get_Symbol(i, j); method 

I have posted the method....    simply takes two variables, and return the Symbol and set the global variable value of "Base_Currency"....


 

 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////                                                GET EURO SYMBOL                                               ///////////////////////////////
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private Symbol Get_Symbol(int t_Pair, int t_value)
        {
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF EURO PAIR SYMBOL IS REQUIRED
            if (t_Pair == 0)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURUSD");
                        break;
                    case 1:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURJPY");
                        break;
                    case 2:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURGBP");
                        break;
                    case 3:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURAUD");
                        break;
                    case 4:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURNZD");
                        break;
                    case 5:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURCHF");
                        break;
                    case 6:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURCAD");
                        break;
                }
                //END SWITCH    
            }
            //END IF
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF GBP PAIR SYMBOL IS REQUIRED
            if (t_Pair == 1)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPUSD");
                        break;
                    case 1:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPJPY");
                        break;

 


@GoldnOil750

ClickAlgo
17 Dec 2015, 13:03 ( Updated at: 21 Dec 2023, 09:20 )

I have run your code and you will see in the log file the time of day for each event.

Nothing happens for (x) minutes which is the time-frame for the instrument, the onBar method is not called until this time has lapsed, the actual processing is very fast to get the prices.

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        protected override void OnStart()
        {
            Print("cBot started at: " + DateTime.UtcNow.TimeOfDay);
        }

        protected override void OnTick()
        {
            // Put your core logic here
        }

        protected override void OnBar()
        {
            Print("onBar method called at: " + DateTime.UtcNow.TimeOfDay);

            for (int i = 0; i < 7; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    var Current_Symbol = GetSymbol(i, j);
                    var str_Current_Symbol = Current_Symbol.Code.ToString();
                    var Current_Symbol_PipSize = Current_Symbol.PipSize;
                    var t1 = MarketData.GetSeries(str_Current_Symbol, TimeFrame.Daily);

                    Print(i + "." + j + "          Daily Open Price " + str_Current_Symbol + "    =    " + t1.Open.LastValue, ToString());
                }

                Print("Processing stopped at: " + DateTime.UtcNow.TimeOfDay);
            }
        }

        private Symbol GetSymbol(int t_Pair, int t_value)
        {
            // simulates all pairs
            switch (t_value)
            {
                case 0:
                    return MarketData.GetSymbol("EURUSD");
                case 1:
                    return MarketData.GetSymbol("EURJPY");
                case 2:
                    return MarketData.GetSymbol("EURGBP");
                case 3:
                    return MarketData.GetSymbol("EURAUD");
                case 4:
                    return MarketData.GetSymbol("EURNZD");
                case 5:
                    return MarketData.GetSymbol("EURCHF");
                case 6:
                    return MarketData.GetSymbol("EURCAD");
                default:
                    return MarketData.GetSymbol("EURUSD");
            }
        }
    }
}

The log file is below, you will notice the delay before the method is called.

 


@ClickAlgo

ClickAlgo
17 Dec 2015, 13:04

If you give me the complete Get_Symbol code we can do a more detailed test.


@ClickAlgo

GoldnOil750
17 Dec 2015, 13:24

RE:

Paul_Hayes said:

If you give me the complete Get_Symbol code we can do a more detailed test.

Have attached the full code for the method "Get_symbol" at the end but before that I have attached the starting cALGO code also.  (*maybe it helps).

 

using System.Globalization;
using System.IO;
using System.Threading;
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]

    public class All_Currency : Robot
    {


 

 

        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private Symbol Get_Symbol(int t_Pair, int t_value)
        {
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF EURO PAIR SYMBOL IS REQUIRED
            if (t_Pair == 0)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURUSD");
                        break;
                    case 1:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURJPY");
                        break;
                    case 2:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURGBP");
                        break;
                    case 3:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURAUD");
                        break;
                    case 4:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURNZD");
                        break;
                    case 5:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURCHF");
                        break;
                    case 6:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("EURCAD");
                        break;
                }
                //END SWITCH    
            }
            //END IF
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF GBP PAIR SYMBOL IS REQUIRED
            if (t_Pair == 1)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPUSD");
                        break;
                    case 1:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPJPY");
                        break;
                    case 2:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPCAD");
                        break;
                    case 3:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPCHF");
                        break;
                    case 4:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPAUD");
                        break;
                    case 5:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("GBPNZD");
                        break;
                    case 6:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURGBP");
                        break;

                }
                //END SWITCH
            }
            //END IF
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF USD PAIR SYMBOL IS REQUIRED
            if (t_Pair == 2)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURUSD");
                        break;
                    case 1:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("GBPUSD");
                        break;
                    case 2:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("AUDUSD");
                        break;
                    case 3:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("NZDUSD");
                        break;
                    case 4:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("USDJPY");
                        break;
                    case 5:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("USDCHF");
                        break;
                    case 6:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("USDCAD");
                        break;
                }
                //END SWITCH
            }
            //END IF
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF JPY PAIR SYMBOL IS REQUIRED
            if (t_Pair == 3)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("GBPJPY");
                        break;
                    case 1:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURJPY");
                        break;
                    case 2:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("USDJPY");
                        break;
                    case 3:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("AUDJPY");
                        break;
                    case 4:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("NZDJPY");
                        break;
                    case 5:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("CHFJPY");
                        break;
                    case 6:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("CADJPY");
                        break;
                }
                //END SWITCH
            }
            //END IF
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF CHF PAIR SYMBOL IS REQUIRED
            if (t_Pair == 4)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("USDCHF");
                        break;
                    case 1:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURCHF");
                        break;
                    case 2:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("GBPCHF");
                        break;
                    case 3:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("AUDCHF");
                        break;
                    case 4:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("NZDCHF");
                        break;
                    case 5:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("CADCHF");
                        break;
                    case 6:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("CHFJPY");
                        break;
                }
                //END SWITCH
            }
            //END IF
            ///////////////////////////////////////////////////////////////////////////////////////////            
            //IF CAD PAIR SYMBOL IS REQUIRED
            if (t_Pair == 5)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("USDCAD");
                        break;
                    case 1:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURCAD");
                        break;
                    case 2:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("GBPCAD");
                        break;
                    case 3:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("AUDCAD");
                        break;
                    case 4:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("NZDCAD");
                        break;
                    case 5:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("CADJPY");
                        break;
                    case 6:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("CADCHF");
                        break;

                }
                //END SWITCH
            }
            //END IF    
            ///////////////////////////////////////////////////////////////////////////////////////////
            //IF AUD PAIR SYMBOL IS REQUIRED
            if (t_Pair == 6)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("AUDUSD");
                        break;
                    case 1:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("AUDJPY");
                        break;
                    case 2:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("AUDNZD");
                        break;
                    case 3:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("AUDCAD");
                        break;
                    case 4:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("AUDCHF");
                        break;
                    case 5:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURAUD");
                        break;
                    case 6:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("GBPAUD");
                        break;

                }
                //END SWITCH
            }
            //END IF    
            ///////////////////////////////////////////////////////////////////////////////////////////
            //IF NZD PAIR SYMBOL IS REQUIRED
            if (t_Pair == 7)
            {
                switch (t_value)
                {
                    case 0:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("NZDJPY");
                        break;
                    case 1:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("NZDUSD");
                        break;
                    case 2:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("NZDCHF");
                        break;
                    case 3:
                        Base_Currency = 1;
                        return MarketData.GetSymbol("NZDCAD");
                        break;
                    case 4:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("AUDNZD");
                        break;
                    case 5:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("EURNZD");
                        break;
                    case 6:
                        Base_Currency = 2;
                        return MarketData.GetSymbol("GBPNZD");
                        break;

                }
                //END SWITCH
            }
            //END IF        
            ///////////////////////////////////////////////////////////////////////////////////////////

            return Symbol;
        }
        //END FUCTION

 

 


@GoldnOil750

GoldnOil750
17 Dec 2015, 13:30

also, one more thing i will like to add that it is slow only when the "FIRST TIME"  On_Bar function is called but on the following Bar it is super fast. 


@GoldnOil750

GoldnOil750
17 Dec 2015, 13:30

also, one more thing i will like to add that it is slow only when the "FIRST TIME"  On_Bar function is called but on the following Bar it is super fast. 


@GoldnOil750

ClickAlgo
17 Dec 2015, 13:51 ( Updated at: 21 Dec 2023, 09:20 )

I used your exact code and the results are below:

Delay to call onBar is 1 minute

each major pair's took approximately 3 seconds

total time to get all prices is about 1 minute 50 seconds

I would suggest putting a timer in your logic which gets prices that are not reliant on your instruments time-frame, if you every set your time-frame to 5 minutes, the robot will not even start getting prices until after 5 minutes has passed.

 

 


@ClickAlgo

ClickAlgo
17 Dec 2015, 13:52

oops i made a mistake, it took 50 seconds to get all price data and NOT 1 minute 50 seconds


@ClickAlgo

GoldnOil750
17 Dec 2015, 14:47 ( Updated at: 21 Dec 2023, 09:20 )

RE:

Paul_Hayes said:

oops i made a mistake, it took 50 seconds to get all price data and NOT 1 minute 50 seconds

Hi Paul,

It took 1 min 52 secs to get the prices and load them on the Charts.   Which is good if you compare to what I was getting earlier;  (nearly full 4 to 5 mins).  Trust me, till one hour ago it was not going that fast but after Printing time on start and end of methods, some how it is working  fast.....  lol

Thank you for your time and effort.   but the same in mt4 I have and it takes around less then 10 seconds to display all the 58 pairs "Pips moved" from start of the day.   I think with cTrader I have to live with it.  Below is the screen shot of the time taken.

thank you !!!!

 


@GoldnOil750

GoldnOil750
21 Dec 2015, 08:37 ( Updated at: 21 Dec 2023, 09:20 )

RE:

Paul_Hayes said:

oops i made a mistake, it took 50 seconds to get all price data and NOT 1 minute 50 seconds

 

Hi Paul,

today it is again taking more then 4 mins to upload the Open Prices.....  I have attached the screen shot.   have tried multiple time but the result is the same.....   (21Dec15)  Is there any work around method for it ??    (It is attached to a 1 min chart and OnBar...   no changes in the code.)

 


@GoldnOil750

ClickAlgo
21 Dec 2015, 11:00

How often and how quickly do you need price updates for your strategy?

If the platform is not providing you with the functionality you require I would look at alternative methods to achieve what you want. Think about either having a separate robot that does nothing but get prices every 1 minute and storing the prices in either an xml, json file, database or any other persistent method to store data and your main robot reads this data every (x) mins/secs.

You could try using an thread if you are familiar with threading, but you have to be very careful as cAlgo.API is not thread safe and the entire application could crash.


@ClickAlgo

GoldnOil750
21 Dec 2015, 11:06

RE:

Paul_Hayes said:

How often and how quickly do you need price updates for your strategy?

If the platform is not providing you with the functionality you require I would look at alternative methods to achieve what you want. Think about either having a separate robot that does nothing but get prices every 1 minute and storing the prices in either an xml, json file, database or any other persistent method to store data and your main robot reads this data every (x) mins/secs.

You could try using an thread if you are familiar with threading, but you have to be very careful as cAlgo.API is not thread safe and the entire application could crash.

 

Hi Paul,

it is only when the cBOT starts for the First Time it takes so much time in Loading the Open Prices.  But after that, getting prices is very very fast; within a second all is done.  SO every time you update your code or our testing on different input values, it is very annoying to wait 4 to 5 mins to fetch the prices.

 

I am thinking of getting one Symbol Price and display and dump it on the first OnBar and then go for all the open prices and see if it helps.  Will keep you posted. Thank  you for your quick response ever !

///S.Khan


@GoldnOil750

GoldnOil750
21 Dec 2015, 20:42

RE: RE:

GoldnOil750 said:

Paul_Hayes said:

How often and how quickly do you need price updates for your strategy?

If the platform is not providing you with the functionality you require I would look at alternative methods to achieve what you want. Think about either having a separate robot that does nothing but get prices every 1 minute and storing the prices in either an xml, json file, database or any other persistent method to store data and your main robot reads this data every (x) mins/secs.

You could try using an thread if you are familiar with threading, but you have to be very careful as cAlgo.API is not thread safe and the entire application could crash.

 

Hi Paul,

it is only when the cBOT starts for the First Time it takes so much time in Loading the Open Prices.  But after that, getting prices is very very fast; within a second all is done.  SO every time you update your code or our testing on different input values, it is very annoying to wait 4 to 5 mins to fetch the prices.

 

I am thinking of getting one Symbol Price and display and dump it on the first OnBar and then go for all the open prices and see if it helps.  Will keep you posted. Thank  you for your quick response ever !

///S.Khan

Hi Paul,

just updating you on the above.
 

For the 1st Time, when OnBar method is called, cBOT takes time in getting the (1)OPEN and (2) CLOSE prices of all 56 pairs, around 2 min in total for each.
For loading the (3)HIGH and (4)LOW prices, even for the 1st Time OnBar method also,  it is super fast, not a second is lost.
Even for loading the ATR values, it takes around 2 mins for all the 56 pairs. (*for the first time OnBar method is called)

so to get the whole information on the CHART, it takes max. around 6 mins.  but then the update of the value OnBar is very swift, within a second.  

OnBar is called every minute.

thank you.
///S.Khan

 

 


@GoldnOil750

ClickAlgo
21 Dec 2015, 22:05

This may solve your problem, load your prices asynchronously at the start. you can break up the calls into work packets if you need the data quicker.

/forum/cbot-support/7593?page=1#6


@ClickAlgo

GoldnOil750
22 Dec 2015, 09:17

RE:

Paul_Hayes said:

This may solve your problem, load your prices asynchronously at the start. you can break up the calls into work packets if you need the data quicker.

/forum/cbot-support/7593?page=1#6

 

Thank you very much !  It is much appreciated.    But I am a novice programmer cum trader and this thing is way out of my league........      

 

What I understand that OnStart you call the different cALGO.API in different threads so they can get data simultaneously...?  am I correct in my understanding ?   the OnBar and OnTIck method will be same.


@GoldnOil750

ClickAlgo
22 Dec 2015, 10:24

The application programming interface (API) just exposes a set of routines to the trading platform, it is in the .NET framework that you write your logic to achieve what you need.If you feel that you need a separate process to get prices while your robot is busy doing another task then you may need to use Asynchronous Parallel programming . We now have the BeginInvokeOnMainThread method included in the cAlgo API  to make this easier to implement.


@ClickAlgo

GoldnOil750
22 Dec 2015, 15:56

RE:

Paul_Hayes said:

The application programming interface (API) just exposes a set of routines to the trading platform, it is in the .NET framework that you write your logic to achieve what you need.If you feel that you need a separate process to get prices while your robot is busy doing another task then you may need to use Asynchronous Parallel programming . We now have the BeginInvokeOnMainThread method included in the cAlgo API  to make this easier to implement.

 

Thank you !


@GoldnOil750