PA PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
19 Mar 2018, 17:54

Hi ceakuk,

MarketSeries.Close.LastValue should always be equal to Symbol.Bid.  However this is not the case with renko.Close.Last(0). See below.

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; }
        private Renko renko;
        [Parameter("Renko Pips", DefaultValue = 10, MinValue = 0.5, Step = 2)]
        public double RenkoPips { get; set; }


        [Parameter("Number Of Bricks", DefaultValue = 100, MinValue = 10, Step = 100)]
        public int BricksToShow { get; set; }

        [Parameter("Zoom Level", DefaultValue = 3, MinValue = 0, MaxValue = 5, Step = 1)]
        public double ZoomLevel { get; set; }

        [Parameter("Bullish bar color", DefaultValue = "SeaGreen")]
        public string BullishBarColor { get; set; }

        [Parameter("Bearish bar color", DefaultValue = "Tomato")]
        public string BearishBarColor { get; set; }
        protected override void OnStart()
        {
            object[] parameterValues = 
            {
                RenkoPips,
                // Bar size
                BricksToShow,
                // Show number of bricks
                ZoomLevel,
                //ZoomLevel
                BullishBarColor,
                // Bullish bar color
                BearishBarColor
                // Bearish bar color
            };
            renko = Indicators.GetIndicator<Renko>(parameterValues);
        }

        protected override void OnTick()
        {
            Print("Last Close Price:" + MarketSeries.Close.LastValue);
            Print("Last Bid Price:" + Symbol.Bid);
            Print("Last Close Renko Price:" + renko.Close.Last(0));
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }
    }
}

Therefore I don't see any issue with MarketSeries.Close.LastValue.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 17:37

Hi ceakuk,

In the original post you said 

MarketSeries.Close.LastValue is totally different from using Symbol.Bid and Symbol.As

however you are not using anywhere MarketSeries.Close.LastValue. You are using renko.Close.Last(0). This is a third party indicator. If you think that this indicator returns wrong values, you should contact the creator of the indicator.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 17:20

Hi ceacuk,

Thank you. Where in the cBot are you using MarketSeries.Close.LastValue? I see only renko.Close.Last(0).

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 16:36

Hi ceakuk,

MarketSeries.Close.LastValue has the Close value of the last bar. Symbol.Ask and Symbol.Bid contain the latest tick prices. Values included in MarketSeries are constructed from past tick data therefore they are accurate. Would you like to give us some more information on what you are doing, maybe by sharing a cBot, so that we can advise further?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 16:28 ( Updated at: 21 Dec 2023, 09:20 )

Hi ceacuk,

In each forum section there is an Add Thread button. See below

Let me know if this helps,

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 15:51

Hi Steve,

Unfortunately I cannot give you an ETA. Our developers are already working on it, so I would expect it in the next couple of releases, without this being final.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 14:23

Hi Singleton,

Indeed you need to have some width to draw horizontal lines. Another suggestion would be to output these prices as indicator outputs. You could have output series with a Points plot type like below

        [Output("Open", Color = Colors.Blue, PlotType = PlotType.Points)]
        public IndicatorDataSeries Open{ get; set; }

        [Output("Close", Color = Colors.Red, PlotType = PlotType.Points)]
        public IndicatorDataSeries Close{ get; set; }

and fill them with the relevant data.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 11:45

Hi Steve,

Thanks for posting in our forum and for your suggestions as well! I would like to inform you that we are currently working on a new chart API that will allow you to easily implement this functionality in the future.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 11:02

Hi lec0456,

It sounds like a defect. Could you please send us some troubleshooting information the next time this happens? You can do so by pressing Ctrl + Alt + Shift + T and submitting the form that will pop up. In the text box please paste a link to this discussion.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 10:14

Hi Pipdays,

Thanks for posting in our forum.What is the full code you are looking for? The code sample posted above by Spotware can be incorporated in any cBot however it does not do anything as a standalone code sample. It is just an example on how to add this logic in your own cBot.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
19 Mar 2018, 10:09

Hi Singleton,

It would be easier for us to help you if you shared with us the complete indicator code.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
16 Mar 2018, 10:07

Hi irmscher9,

Do you mean the AUD shown in your P&L columns? This is your account's currency not the pair currency.

Let me know if this is not what you mean.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
15 Mar 2018, 14:11 ( Updated at: 21 Dec 2023, 09:20 )

Hi jjwes76@gmail.com,

It represents the periods. See below

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Mar 2018, 14:14

Hi Leonardo,

Thanks for posting in our forum. Regarding your question, currently this is not possible in cAlgo.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Mar 2018, 14:06

Hi shelby.pereira,

Thanks for reporting this issue. Do you mind sending us a couple of screenshots so that we can see and investigate further?

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
14 Mar 2018, 09:50

Hi yearn2012,

The reason you cannot debug a custom indicator is because you probably installed cTrader 3.0 on a computer that already has cAlgo 2.01 installed. In this case, your existing cBots are not replaced, however they need a necessary addition in order to be debuggable in Visual Studio. In order to resolve this problem, please follow the next steps

  1. Go to Properties > AssemblyInfo.cs
  2. Add the following code at the bottom of the file
#if DEBUG
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations)]
#endif

This should fix your problem. Repeat this solution for every indicator/cBot you need to debug in Visual Studio. Newly generated cBots/Indicators should contain this attribute by default.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
13 Mar 2018, 17:12

Hi irmscher9,

This is by design.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
13 Mar 2018, 15:59

Hi irmscher9,

In order for your accounts not to show up in cMirror, you need to ask your broker to unlink them from your cTID.

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
13 Mar 2018, 14:08

Hi Alexander,

You can use  History.FindLast()

Best Regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
13 Mar 2018, 12:45

Hi Alexander,

You can use History to access historical trades. Let me know if this helps.

Best Regards,

Panagiotis


@PanagiotisCharalampous