Topics
Replies

firemyst
26 Oct 2023, 01:18 ( Updated at: 26 Oct 2023, 05:35 )

It's not yet a feature in cTrader, and has been seriously lacking for some time - they need to up their game to keep up with the competition.


@firemyst

firemyst
26 Oct 2023, 01:17 ( Updated at: 26 Oct 2023, 05:35 )

No. cBots essentially can't disable anything in the cTrader interface.


@firemyst

firemyst
26 Oct 2023, 01:15 ( Updated at: 26 Oct 2023, 05:35 )

How about posting a screen capture of the “other extraneous elements” you'd like removed so people actually know what you're referring to as there might be options already to have them removed.


@firemyst

firemyst
26 Oct 2023, 01:14 ( Updated at: 26 Oct 2023, 05:35 )

Have you tried installing it without being signed in to your One Drive?


@firemyst

firemyst
26 Oct 2023, 01:12 ( Updated at: 26 Oct 2023, 05:35 )

It would be even better if you post this in the appropriate forum:

 

https://ctrader.com/forum/suggestions

 


@firemyst

firemyst
26 Oct 2023, 01:04

Those properties aren't available, which is a pain.

You have to do it separately, which is even more of a hassle :-/

 


@firemyst

firemyst
26 Oct 2023, 01:02

Run it on Demo, see how the trades are playing out, and re-evaluate your strategy. 

 

Also make sure when running the test simulator that you're using tick data rather than M1 bar data


@firemyst

firemyst
23 Oct 2023, 02:12

@Spotware please delete this spam


@firemyst

firemyst
18 Oct 2023, 11:52

RE: RE: Is there any way to retrieve the bar's bar count at which the position was entered?

JINGXUAN said: 

 

and it says :

‘Position[]’ does not contain a definition for ‘EntryTime’ and no accessible extension method ‘EntryTime’ accepting a fist argument of type ‘Position[]’ could be found

 

Of course it doesn't contain a definition. Your getting Long/Short positions returns arrays of Position objects; my example is with a single Position object. 

The property “EntryTime” is for a single Position object, not an array of Position objects. 

 

 


@firemyst

firemyst
14 Oct 2023, 15:34

To get the index of the bar where the latest position was opened:

Position p; //get your position information

//then get the index:

int barIndex = Bars.OpenTimes.GetIndexByTime(p.EntryTime);
 


@firemyst

firemyst
14 Oct 2023, 12:52

Numerous people.

 

You can start with @PanagiotisChar


@firemyst

firemyst
07 Oct 2023, 13:28 ( Updated at: 08 Oct 2023, 06:03 )

I suspect the cTrader team would only include support for .Net 8 and skip over the odd numbers. 

As a product manager, why build in support for a product that Microsoft has said will only have a short term life span of just over a year?

.Net 8.0 will have long term support, and thus should have a life span until at least Nov 2026.

https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core

 


@firemyst

firemyst
02 Oct 2023, 08:04

Take the date of the opening time of the bar before, and the first bar after.

 

then find the difference between the two, divide by 2, and add that to the opening time of the bar before the midpoint.

 

Ex:

open time to bar before is Sept 15, 6pm

open time of bar after is Sept 15, 8pm

Difference between them is 2 hours

2 / 2 == 1

6pm + 1 == 7pm.

 


@firemyst

firemyst
17 Sep 2023, 12:09

That's a paid indicator, so ask the person you bought it from.

My first guess is:

  1. oscillator lookback period is how many periods back it looks for divergence on an oscillator
  2. Lookback period is how many periods it looks back for divergence on the main chart

 


@firemyst

firemyst
16 Sep 2023, 14:58

Yes. 

Add one onto your chart like any other indicator.


@firemyst

firemyst
11 Sep 2023, 18:35

Another option you have is the following:

  1. hard code a date in your indicator/bot that's a day or two in the future
  2. check the date in your code against the Server.Time object
  3. if the server's time is > the time you have hard-coded in your code, have your code do nothing. 

Example for a starting point. You'll obviously have to tweak it to fit your needs:

                    if (Server.TimeInUtc > new DateTime(2023, 9, 13))
                       return;
 

Since the cAlgo files are encrypted, nobody should hypothetically be able to crack and adjust your code; and they shouldn't be able to backwards adjust the Server's time either to bypass your time constraint because if they can, Spotware would have a gaping security hole there. 


@firemyst

firemyst
11 Sep 2023, 18:27

//For longs
if (Bars.LowPrices.Last(0) > yourPosition.EntryPrice)
{
    int newStopLoss = Bars.LowPrices.Last(0);
    TradeResult r = yourPosition.ModifyStopLossPrice(newStopLoss);
    if (r.IsSuccessful)
      ...
    else
        ...
}

@firemyst

firemyst
11 Sep 2023, 18:21

When an exception happens, write out the values of any variables you want to a text file; then next time you start your bot, read the values in from the text file if it exists.

the text file can be saved as JSON data, CSV, or any other formats that you want to work with.


@firemyst

firemyst
30 Aug 2023, 07:59

You'd have a better chance of a response if you post more of your code that reproduces the problem.


@firemyst

firemyst
27 Aug 2023, 15:26

You need to do something like this:

                    ChartText ct = Chart.DrawText("FB_Signal" + index, textFB, index, yFB, colorFB);
                    ct.VerticalAlignment = VerticalAlignment.Center;
                    ct.HorizontalAlignment = HorizontalAlignment.Left;

Play wit the Vertical and Horizontal alignments.


@firemyst