Topics
11 Nov 2021, 14:21
 861
 1
20 Aug 2020, 16:13
 1294
 3
13 May 2020, 20:21
 889
 4
25 Mar 2020, 14:04
 921
 2
17 Feb 2020, 13:29
 884
 2
24 Oct 2019, 21:08
 1081
 1
03 Apr 2019, 17:03
 1230
 7
Replies

bienve.pf
05 Jan 2023, 14:22

For what it's worth I use VS to edit and compile and also sometimes I use ctrader to compile with source code.

Perhaps this can serve as a clue.


@bienve.pf

bienve.pf
04 Jan 2023, 15:55 ( Updated at: 21 Dec 2023, 09:23 )


@bienve.pf

bienve.pf
04 Jan 2023, 15:28

In my computer I had other versions like 4.1. I suppose this is not a problem. And the compiler I use is external NET. But this happend with all compilers


@bienve.pf

bienve.pf
04 Jan 2023, 15:26

 


@bienve.pf

bienve.pf
26 Apr 2021, 11:39

 This a sample bot that use the MTF indicator

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
using System.Threading;
using System.Windows.Forms;
using System.Net;
using System.IO.Compression;
using System.IO;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class borrar : Robot
    {

        [Parameter("Data Location", DefaultValue = VerticalAlignment.Bottom)]
        public VerticalAlignment DataLocation { get; set; }



        [Parameter("Load MTF", DefaultValue = true)]
        public bool LoadMTF { get; set; }


        MTF _mtf;

        protected override void OnStart()
        {
            // Put your initialization logic here
            if (LoadMTF)
                _mtf = Indicators.GetIndicator<MTF>(DataLocation);


        }
        protected override void OnTick()
        {

            if (LoadMTF)
            {
                var last = _mtf.Result.LastValue;
            }

        }
    }
}

 


@bienve.pf

bienve.pf
26 Apr 2021, 11:38

 This is a test indicator. Just insert in Chart of Backtesting to see that info changes about TimeFrame bar counters

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

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class MTF : Indicator
    {

        [Parameter("Data Location", DefaultValue = VerticalAlignment.Bottom)]
        public VerticalAlignment DataLocation { get; set; }



        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }


        Bars bars1;
        Bars bars2;
        Bars bars3;
        Bars bars4;

        protected override void Initialize()
        {
            // Initialize and create nested indicators

            bars1 = MarketData.GetBars(TimeFrame.Hour);
            bars2 = MarketData.GetBars(TimeFrame.Hour4);
            bars3 = MarketData.GetBars(TimeFrame.Hour12);
            bars4 = MarketData.GetBars(TimeFrame.Daily);


        }


        public override void Calculate(int index)
        {
            string info = bars1.TimeFrame.ToString() + " -> " + bars1.Count + "\n" + bars2.TimeFrame.ToString() + " -> " + bars2.Count + "\n" + bars3.TimeFrame.ToString() + " -> " + bars3.Count + "\n" + bars4.TimeFrame.ToString() + " -> " + bars4.Count;

            Chart.DrawStaticText("info", info, DataLocation, HorizontalAlignment.Right, Color.White);
        }
    }
}

 


@bienve.pf

bienve.pf
17 Mar 2021, 12:23

RE:

amusleh said:

The team were able to reproduce this issue and it will be fixed in future releases, thanks.

Perfect. Thanks for your response.


@bienve.pf

bienve.pf
10 Mar 2021, 13:46

Thanks for the reply. Good solution


@bienve.pf

bienve.pf
10 Mar 2021, 00:16

look at the yellow text on left of Chart while moving the line. Data is not updated until object is dropped


@bienve.pf

bienve.pf
10 Mar 2021, 00:13

RE:

PanagiotisCharalampous said:

Hi bienve.pf,

I checked this with the product team and the this behavior is normal of interactive objects. A workaround is to create a non-interactive line for drawing purposed and make it interactive on second mouse click. Like this

Chart.MouseDown += arg =>
            {
                Print("MouseDown event....");
                if (_line == null)
                {
                    _line = Chart.DrawTrendLine("myline", arg.TimeValue, arg.YValue, arg.TimeValue, arg.YValue, Color.Yellow, 2);
                    _line.IsInteractive = false;
                }
                else
                {
                    _line.IsInteractive = true;
                    _line = null;
                }
            };

Let me know if this helps.

Best Regards,

Panagiotis 

Join us on Telegram

 

Hi,
the problem is that if I move the line through one of its vertices it is not possible to capture or read the properties (Time / Y) while moving to be able to dynamically move a text with or other linked lines with it


@bienve.pf

bienve.pf
12 Nov 2020, 21:01

Numeric Box

Ok. TextBox is for text but why haven't you implemented a "NumbericBox" that is only for numbers?

Other events are needed to handle controls like OnBlur / OnLeave / OnFocus


@bienve.pf

bienve.pf
17 Aug 2020, 17:20

RE:

PanagiotisCharalampous said:

Hi bienve.pf,

The reason it doesn't move is because the retrieved bars are consist of completed bars. So you get the completed bar of the specific date. The price will change as soon as the date changes. There is a similar discussion about this here.

Best Regards,

Panagiotis 

Join us on Telegram

I understand,
But if I test multi-timeframe indicator in backtesting I need receive data like in realtime to parse all tics at the moment. Now,  with all the finalized bars and finalized values the ClosePrices no moves and It is not a real stage.


@bienve.pf

bienve.pf
17 Aug 2020, 17:04

RE:

PanagiotisCharalampous said:

Hi bienve.pf,

I checked this and seems to work fine for me. Can you provide me with an example?

Best Regards,

Panagiotis 

Join us on Telegram

 

Hi Panagiotis,

have you inserted the indicator in a backtesting chart and hit play?

the counter Daily does not move. neither the bars nor the price "Close"


@bienve.pf

bienve.pf
14 May 2020, 09:36

RE:

PanagiotisCharalampous said:

Hi bienve.pf,

Can you please provide more information about this issue like the symbol and a cBot to reproduce it? 

Best Regards,

Panagiotis 

Join us on Telegram

 

It happens when the lots are less than 1, for example 0.10 


@bienve.pf

bienve.pf
25 Oct 2019, 16:33

so is. but the platform should prioritize security and not copy the positions that break the proportionality Regards.
@bienve.pf

bienve.pf
04 Jun 2019, 19:02 ( Updated at: 21 Dec 2023, 09:21 )

This control box is made less in cCopy



@bienve.pf

bienve.pf
04 Apr 2019, 16:07

OK. But do you have planned to Include some API ike this?

var response = ClosePosition(Position);  

var trade = response.HistoricalTrade;

 


@bienve.pf

bienve.pf
04 Apr 2019, 16:05

you have planned to onclude

var response = ClosePosition(Position);
  
if(response.IsSuccessful){
  
    var Trade =   response.HistoricalTrade;
  
}

 


@bienve.pf

bienve.pf
03 Apr 2019, 17:53

the ideal solution would be

var response = Robot.ClosePosition(Position);
 
if(response.IsSuccessful){
 
    var Trade =   response.HistoricalTrade;
 
}

 


@bienve.pf

bienve.pf
03 Apr 2019, 17:50

In backtesting, History is updated correctly and finds trades closed correctly after partial and complete closures.
The problem occurs in real time with market data


@bienve.pf