Topics
06 Jun 2019, 17:34
 1209
 3
16 May 2019, 04:33
 1461
 3
08 May 2019, 00:41
 1198
 3
07 May 2019, 13:26
 1065
 1
26 Apr 2019, 04:45
 1703
 5
24 Apr 2019, 21:34
 1080
 1
Replies

lec0456
05 Apr 2021, 09:37

RE: RE: No symbols have been loaded for this document in VS 2019

lec0456 said:

lec0456 said:

I am using VS 2019 Enterprise and I get the message: "No symbols have been loaded for this document", for each break point I put in my bot.  I followed all the instructions in the cTrader Guide. So, whats the problem?

ok, I fixed it.  I uninstalled cTrader completely by removing the directories under the AppData\Roaming folder, but i don't think that was the key. I had previous versions of VS on my system from 2010/12/15 and 17.  I used the extension manager to install the cBot extension in VS2019. So, I uninstalled the extension. I did that for every version and edition.  Like I had 2019 Community and Enterprise and 2017 Community and enterprise. So, once I had the extensions all uninstalled. I went to cTrader and tried clicking edit in VS.  It did nothing. Didn't open VS or launch the extension installer.  So, from another post in the forum,I found a registry key in

HKCU\Software\\Microsoft\VisualStudio\11\ExtensionManager\EnabledExtensions\2c72cc50-6c69-4b16-b1f4-ab470673f284,1.6

that was preventing the installer from launching. Once I removed the key, the installer worked from cTrader.  Once, I had the extension reinstalled by cTrader, rather than from the VS extension manager, and I built the solution in VS, the debugger in VS 2019 worked. All the symbols loaded properly and the breakpoints are working.

The post from the other forum found the problem in a different registry key.

HKCU\Software\\Microsoft\VisualStudio\10\ExtensionManager\EnabledExtensions\2c72cc50-6c69-4b16-b1f4-ab470673f284,1.4

Must be leftover keys from previous installations. I don't how or why the old extensions that were installed affected a new install of VS2019 with the new cBot extension but apparently it had a problem. I don't think the reinstall of cTrader was necessary after al that but I was eliminating variables. Hope that helps someone.

 

OK, scratch that. While the above will help you if you can't trigger the VS installer from cTrader.  My problem with breakpoints not working and symbols not loading persisted.  The issue seems to be that VS2019 only loads the symbols if the Bot is running when you attach the process.  So, I have to start backtesting and THEN attach to process for the symbols to load and the breakpoints to work. This is NOT the way the cTrader Help Center describes the process. It specifically says to attach the process before running the bot.  But that won't work for me. So, either I am doing something wrong or the cTrader documentation is wrong. Or maybe it needs to be updated for changes in VS2019.  I would like a response from cTrader about this issue.


@lec0456

lec0456
05 Apr 2021, 06:31

same problem but I had VS 2019

So, I had the same problem. When i went to click edit in VS cTrader did nothing. I was troubleshooting a problem with debugging in 2019.  I uninstalled all the extension using the extension manager in VS. Note: I had community and enterprise versions for 2019 and 2017. i figured it would trigger the extension installer when I clicked edit in VS using cTrader.  It did not. Turns out using the info above, I had a registry entry under \VisualStudio\11\ExtensionManager\EnabledExtensions\<same number as above>.  Once I deleted it, ctrader launched the installer.


@lec0456

lec0456
05 Apr 2021, 05:19 ( Updated at: 05 Apr 2021, 07:05 )

RE: No symbols have been loaded for this document in VS 2019

lec0456 said:

I am using VS 2019 Enterprise and I get the message: "No symbols have been loaded for this document", for each break point I put in my bot.  I followed all the instructions in the cTrader Guide. So, whats the problem?

ok, I fixed it.  I uninstalled cTrader completely by removing the directories under the AppData\Roaming folder, but i don't think that was the key. I had previous versions of VS on my system from 2010/12/15 and 17.  I used the extension manager to install the cBot extension in VS2019. So, I uninstalled the extension. I did that for every version and edition.  Like I had 2019 Community and Enterprise and 2017 Community and enterprise. So, once I had the extensions all uninstalled. I went to cTrader and tried clicking edit in VS.  It did nothing. Didn't open VS or launch the extension installer.  So, from another post in the forum,I found a registry key in

HKCU\Software\\Microsoft\VisualStudio\11\ExtensionManager\EnabledExtensions\2c72cc50-6c69-4b16-b1f4-ab470673f284,1.6

that was preventing the installer from launching. Once I removed the key, the installer worked from cTrader.  Once, I had the extension reinstalled by cTrader, rather than from the VS extension manager, and I built the solution in VS, the debugger in VS 2019 worked. All the symbols loaded properly and the breakpoints are working.

The post from the other forum found the problem in a different registry key.

HKCU\Software\\Microsoft\VisualStudio\10\ExtensionManager\EnabledExtensions\2c72cc50-6c69-4b16-b1f4-ab470673f284,1.4

Must be leftover keys from previous installations. I don't how or why the old extensions that were installed affected a new install of VS2019 with the new cBot extension but apparently it had a problem. I don't think the reinstall of cTrader was necessary after al that but I was eliminating variables. Hope that helps someone.

 


@lec0456

lec0456
05 Apr 2021, 04:56

No symbols have been loaded for this document in VS 2019

I am using VS 2019 Enterprise and I get the message: "No symbols have been loaded for this document", for each break point I put in my bot.  I followed all the instructions in the cTrader Guide. So, whats the problem?


@lec0456

lec0456
21 Mar 2021, 17:45

RE:

lec0456 said:

How can I display some custom text when the mouse rolls over an IndicatorDataSeries Output on a indicator area? In other words, the IsOverlay is set to false for the indicator.

It does not appear that the Output Series' are considered objects on the chart. because if I place: Print("objects:"+obj.ChartArea.Objects.Count); in the MouseMove event it returns zero.


@lec0456

lec0456
21 Mar 2021, 17:37

RE:

Thanks, but what i am really looking for it that the tooltip appears when the mouse rolls over the Output line. So, if Main is the moving average, when you rollover main it displays the text at the point you rolled over the line.


@lec0456

lec0456
13 Nov 2020, 03:51

RE:

Ah, ok, didn't think of that. But wasn't sure if I needed a workaround of if it could be done by setting an attribute

 


@lec0456

lec0456
09 Nov 2020, 20:39

RE:

PanagiotisCharalampous said:

Hi lec0456,

If you mean to uncheck the box from the code, then no this is not possible. You can program such behavior yourself using custom parameters.

Best Regards,

Panagiotis 

Join us on Telegram

Also, it doesn't appear from a search that the forum has much info about custom parameters. See here:

 


@lec0456

lec0456
09 Nov 2020, 20:27

RE:

PanagiotisCharalampous said:

Hi lec0456,

If you mean to uncheck the box from the code, then no this is not possible. You can program such behavior yourself using custom parameters.

Best Regards,

Panagiotis 

Join us on Telegram

Custom Parameters?  How so? The parameter looks like this:

        [Output("LstPkMo", PlotType = PlotType.Histogram, Thickness = 1, LineColor = "Purple")]
        public IndicatorDataSeries LstPkMo { get; set; }

is there an output attribute I can set like visibility? or disabled? Or can I refer to the chart object in some way?  Maybe you can provide an example of using a custom parameter? Thanks

 

 

 


@lec0456

lec0456
03 Sep 2019, 06:06

I don't want to rain on anyones parade  but this update gives the impression like some technology loving kid is running development having fun with all the "cool" things he can do, adding more bell and whistles. But! multi sysmbol backtesting is the one and only thing that he should be working on.  We have been waiting on this for years, it has the potential to make users money and it would give your software a competative advantage over your competitors. My suggestion, Put this developer kid in the basement at cTrader head quarter and don't let him out until he has finished the multi currency backtesting update!!!!!


@lec0456

lec0456
17 Jun 2019, 08:00

They are usually responsive. I want to use the older version while they get a bug fixed regarding calculating the draw downs.  The other issues I noticed were the log date while backtesting was showing today's date intermitently, the date label on the baktesting chart disppeared when using crosshair tool and when modifying positions it is checking the values and generating technical errors where as before it was ignoring them, so we need some edscriptions.

Other than that I like the new interface, I saw a good idea to have a pushpin instead of a sproket for the Bot parameters so you can pin them open or not. 

Nothing major so far than i know of.

But I am in the middle of backtesting and my numbers are off between brokers because they are on different versions

 


@lec0456

lec0456
03 Jun 2019, 20:00

In the OnTick Event I have the following code:

                #region Manual Stoploss Position Closing for good measure only
                foreach (var position in Positions)
                {
                    if (position!=null && position.TradeType==TradeType.Buy && position.StopLoss!=null && Symbol.Bid<position.StopLoss)
                    {
                        Log(paramIntLogEnable, paramExtLogEnable,"Sending Manuel SL Sell Close of {0} @tick {1}", position.Label,t0);
                        if (ClosePosition(position).IsSuccessful && Positions.Count == 0) return;
                    }
                    
                    if (position!=null && position.TradeType==TradeType.Sell && position.StopLoss!=null && Symbol.Ask>position.StopLoss)
                    {
                        Log(paramIntLogEnable, paramExtLogEnable,"Sending Manuel SL Sell Close of {0} @tick {1}", position.Label,t0);
                        if (ClosePosition(position).IsSuccessful && Positions.Count == 0) return;
                    }
                }
                #endregion

Frankly the code should never run because when the position hits the stoploss it should close but it does run when there is a jump in price.

 

Here is an exapmple of what it did today while live trading:

03/06/2019 17:00:18.342 | Master cBot V2.11, EURUSD, m15 | Sending Manuel SL Close of NYSess:100
03/06/2019 17:00:18.342 | Master cBot V2.11, EURUSD, m15 | Closing position PID2965992
03/06/2019 17:00:18.545 | Master cBot V2.11, EURUSD, m15 | → Closing position PID2965992 FAILED with error "TechnicalError", Position PID2965992
03/06/2019 17:00:18.561 | Master cBot V2.11, EURUSD, m15 | ErrorCode: Technical Error #1.
03/06/2019 17:00:18.561 | Master cBot V2.11, EURUSD, m15 | Sending Manuel SL Close of NYSess:100
03/06/2019 17:00:18.561 | Master cBot V2.11, EURUSD, m15 | Closing position PID2965992
03/06/2019 17:00:18.733 | Master cBot V2.11, EURUSD, m15 | → Closing position PID2965992 FAILED with error "EntityNotFound", Position PID2965992
03/06/2019 17:00:18.733 | Master cBot V2.11, EURUSD, m15 | ErrorCode: Entity Not Found.

 


@lec0456

lec0456
01 Jun 2019, 09:18

Nice job on this update! Just got a roll out on on of the brokers.

If we could just get multi currency backtesting it will be complete!

Being able to save old backtests and load them would be awesome too.


@lec0456

lec0456
24 May 2019, 09:16

Any update on Multi Currency backtesting?


@lec0456

lec0456
16 May 2019, 08:54

Well, I figured out the issue.  If you try to modify a position and give it the same values it already has for Tp and SL, it will return a technical error.

I guess it would be nice to know if there are any more robust error messages that can be returned from the OnError event or TradeResult objects.


@lec0456

lec0456
16 May 2019, 04:39

I forgot to include my procedure that modifies the position.  For some reason, if I use it, it does not raise the technical error.  But it should because its using the same method.

        bool ModifyTrade(string descrip, Position position, double? sl = null, double? tp = null, bool _hasTrail=false)
        {
            if (position.StopLoss != sl || position.TakeProfit != tp)
            {
                Log(paramIntLogEnable, paramExtLogEnable,descrip);
                
                if (ModifyPosition(position, sl, tp, _hasTrail).IsSuccessful) return true;
                else Log(paramIntLogEnable, paramExtLogEnable,"Modify Failed: {0}", LastResult.Error);
            }
            return false;
        }

 


@lec0456

lec0456
08 May 2019, 00:45

The log looks like this:

07/05/2019 15:45:25.808 | Master cBot V2.11, EURUSD, m15 | Sending Manuel SL Close of NYSess:-290
07/05/2019 15:45:25.808 | Master cBot V2.11, EURUSD, m15 | Closing position PID2928564
07/05/2019 15:45:26.120 | Master cBot V2.11, EURUSD, m15 | → Closing position PID2928564 FAILED with error "EntityNotFound", Position PID2928564
07/05/2019 15:45:26.152 | Master cBot V2.11, EURUSD, m15 | ErrorCode: Entity Not Found.


@lec0456

lec0456
07 May 2019, 13:22

That was a good idea!


@lec0456

lec0456
06 May 2019, 12:13

Ok, so I started using that line instead of the _count.ShowDialog because the show dialog would open on any screen, not in the center of the application that called it.  And i think I forgot to comment out the Show dialog after using it. So yes that looks redundant.

Thanks. 


@lec0456

lec0456
02 May 2019, 08:21

I can use Visual Studio.  But it runs just fine.  It is only after running for a long period of time that it crashes. Maybe the thread is bleeding memory?? I don't know I am not an expert on threaded procedures.i was capable enough to find most of the code on this Forum and modify it for my application.


@lec0456