Topics
09 Apr 2025, 11:13
 16
 1
01 Apr 2025, 08:01
 59
 1
07 Mar 2025, 14:54
 72
 1
11 Feb 2025, 13:04
 162
 2
26 Jan 2025, 11:42
 156
 1
14 Jan 2025, 09:21
 158
 1
19 Dec 2024, 16:10
 0
 205
 0
11 Dec 2024, 09:55
 283
 2
04 Nov 2024, 17:12
 453
 5
22 Oct 2024, 06:29
 0
 299
 0
20 Oct 2024, 04:36
 323
 1
11 Oct 2024, 06:30
 0
 303
 0
11 Oct 2024, 06:30
 0
 319
 0
10 Oct 2024, 12:37
 310
 2
13 Sep 2024, 07:14
 1
 297
 0
21 Aug 2024, 16:28
 0
 298
 0
Replies

eynt
20 Apr 2021, 15:21

RE:

I've tried the following but when I change the text in one of the files in the directory but nothing happens (no prints):

 

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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
   
    public class NewIndicator : Indicator
    {
        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }

        private FileSystemWatcher _watcher;

        protected override void Initialize()
        {
            _watcher = new FileSystemWatcher(@"d:\temp\");

            _watcher.NotifyFilter = NotifyFilters.Attributes
                                 | NotifyFilters.CreationTime
                                 | NotifyFilters.DirectoryName
                                 | NotifyFilters.FileName
                                 | NotifyFilters.LastAccess
                                 | NotifyFilters.LastWrite
                                 | NotifyFilters.Security
                                 | NotifyFilters.Size;

            _watcher.Changed += OnBlockFileChanged;
        }
        private void OnBlockFileChanged(object sender, FileSystemEventArgs e)
        {
            try
            {
                Print("OnBlockFileChanged " + e.ChangeType + "    " + e.Name);
            }
            catch (Exception ex)
            {
                Print("error OnBlockFileChanged " + ex);
            }
        }
        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = ...
        }
    }
}
 

 


@eynt

eynt
18 Apr 2021, 12:06

RE:

Hi

There's a problem with this approach:

Once the LoadMoreHistory (which was called by the first indicator) is finished, the secondary immediately calls the Calculate method, BEFORE the first indicator had the time to change the value in the file. Therefor, the Calculate method will not be called although it should have.

 

Thanks

 


@eynt

eynt
13 Apr 2021, 20:46

RE:

What is a backlog?

 


@eynt

eynt
13 Apr 2021, 08:25

RE: RE:

Is there a feature request regarding this issue?

 

Thanks


@eynt

eynt
09 Apr 2021, 08:31

RE:

Be able to develop cBots/Indicators by viewing charts, running back tests, etc. A valid connection is not always available.

 

Thanks

 


@eynt

eynt
06 Apr 2021, 20:08

RE:

I've added a feature suggestion. Please vote for it on the following link:

cTDN Forum - Load more History on Backtest (ctrader.com)


@eynt

eynt
06 Apr 2021, 15:52

RE:

PanagiotisCharalampous said:

SL and TP are kept on the server and they are associated to the position.

 

On the server you mean at the broker's server?

 


@eynt

eynt
06 Apr 2021, 15:42

RE:

When I use ModifyStopLossPrice I don't see an order at the "Orders" tab nor at the PendingOrders property.

 

1. Is the SL placed internally on cTrader or at the broker?

2. Where can I see the SL order by code?

3. What happens if the cTrader app is restated, is the SL is kept or canceled?

 

Thanks


@eynt

eynt
02 Apr 2021, 13:00

RE:

I am not sure how to implement the Positions.Modified event in the context I was talking about.

the PositionModifiedEventArgs object only gives a Position object which does not give (to my understanding a state if the order was filled, cancelled, etc.

Perhaps you can give a small code example of how to know when a stop loss was filled after entering a position using ExecuteMarketOrder and placing its stop loss using ModifyStopLossPrice.

 

Thank you


@eynt

eynt
01 Apr 2021, 10:50

RE:

I will try that, thank you.

Should there by any adjustments in case of running the cBot on a back test?

 


@eynt

eynt
31 Mar 2021, 21:31

RE: RE: RE:

Of course it is useful. If I start running a back test from a specific date, I will need a certain amount of past data before that date. This amount (bars or days) is not always known and can be decided when starting the back test. For example, on the start of my cBot I will keep calling LoadMoreHistory until a specific condition is filled. The amount of times I will call the function (and as a result the bars count loaded) is not fixed and can be changed according to market conditions.

 


@eynt

eynt
31 Mar 2021, 10:31

RE: RE:

?


@eynt

eynt
29 Mar 2021, 11:26

RE:

Is it panned for a future version? Is there a feature I can vote for? If not, hoe can I submit a feature request?

 

Thanks

 


@eynt

eynt
26 Mar 2021, 10:48

RE: RE:

Works well. Thank you!

 


@eynt

eynt
04 Mar 2021, 12:33

RE:

Problem solved by itself. Not sure what has happened

 


@eynt

eynt
03 Mar 2021, 12:48

RE:

Is it possible that it happens because I am already copying it with OctaFx?

 


@eynt

eynt
18 Dec 2020, 09:01

RE:

Anything new?

 


@eynt

eynt
25 Nov 2020, 15:13

RE:

Is there a way to run my own strategy (not copy) in a server instead of a PC?

 

Thanks

 


@eynt

eynt
25 Nov 2020, 13:50

RE:

I'd like to delete and redownload the data of a specific symbol (for example GBPUSD) and see if it works.How can I do that?

 

Thanks

 


@eynt

eynt
24 Nov 2020, 18:50

RE:

Thank you

 

I started today copying for the first time. My impression is that all copying actions are done on web and not on the desktop app. Are there any plans to use Copy via the desktop app in the future?

 


@eynt