Topics

Forum Topics not found

Replies

cAlgo_Fanatic
27 Feb 2013, 14:58

Please post the rest of the code.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
27 Feb 2013, 12:42

Do you mean you are using this indicator as a reference in a Robot? If so please post the code of the Robot as well as myHaikinAshi Indicator or email it to engage@ctrader.com so that we can look into it.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
26 Feb 2013, 14:07

Thank you for reporting this. It will be corrected.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
26 Feb 2013, 12:59

Multi time frames are not currently supported. Furthermore, Moving Averages are not straight lines, therefore we need to understand what formula/logic you want to use to output straight lines.
A straight line is described by two points on the graph. Which points would those be if the moving average is used, the last two values for instance? If the lines are horizontal then one point. Would that be the last value?

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
26 Feb 2013, 12:18

Please see this post relating to Indicators Indicator Overlay

Otherwise, please post the code so that we can assist you.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
26 Feb 2013, 10:17

RE:
susantasaren said:

According to the conditions of "Sample Trend Robot" it opens and closes position immediately when the SMA crosses each other.

What I want is that the robot should check two conditions before opening and closing positions. They are:-

1) SMA Crosses each other and remain crossed in Last Candle and 

2) Buy and Sell Order only takes place in New Candle Opening.

Can anyone code this thing.

Thanks.

Therefore the only difference is that the SMA remain crossed for a while before a new order is requested? If so, for how many bars should they remain crossed?

You may want to look into the functions HasCrossedAbove/HasCrossedBelow.

 


@cAlgo_Fanatic

cAlgo_Fanatic
26 Feb 2013, 09:18

It will be fixed this week.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
25 Feb 2013, 11:44

You can use this code:

    [Indicator(ScalePrecision = 5)]

See scaleprecision in the API Reference section.

 


@cAlgo_Fanatic

cAlgo_Fanatic
25 Feb 2013, 11:22

Do you mean horizontal lines that pass through the last index value of the sma?


@cAlgo_Fanatic

cAlgo_Fanatic
25 Feb 2013, 11:17

Not at the moment, the only way is with the Points.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
25 Feb 2013, 11:14 ( Updated at: 21 Dec 2023, 09:20 )

If you changed the code please repost it so that we can investigate. The original code you posted with the only modification of overlaying the output on the chart produces this result:


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 17:14

Hello supafly,

There is glitch with the new order window allowing you to modify an order outside the allowable range. It will be fixed in the next release. We apologize for this.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 16:47

No, there is no object with this information currently.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 16:31

Hello fulmonte,

We apologize for this inconvenience. Please find a workaround solution for indicators here: /forum/indicator-support/505?page=2#1.

We will investigate if there are any issues causing the platform to freeze. If possible send us an email to engage@ctrader.com with the following information: name of the platform you are using (top Menu->Help->About cAlgo. e.g. Spotware cAlgo), your account number as well as the pc specs. It will also help if you can send us the code you use for the robots.

For pc specs:

on the command prompt of windows (run as administrator

run this command

msinfo32 /nfo c:\Information.nfo

locate this file and send it to us.

 

Regards,

 


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 12:46

RE:
flashpipuk said:

im not usualy this grumpy in the morning and i really do like the kit but these little things start to add up to a lot over the course of time. click the scroll> market order next to the word profit (eur) yet you then click on limit order then next to the word profit (gbp) then check stop order this also says profit(GBP) so what is it GBP or EUR?

The issue lies with updating the text string from EUR to the account's currency. The correct is the account's currency, in your case I presume GBP. It will be fixed in the next release. Again, we apologize for the error and thank you for your patience while we resolve this.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 11:28

Can you please send us a screenshot of this. Why do you think it is calculated in GBP? 


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 11:05

Hello,

We apologize for this inconvenience. There is a temporary workaround while we work at providing a solution.

Please see if the solution provided at this post applies to your indicators. /forum/indicator-support/505?page=2#11.

Regards,


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 11:01

We have identified the problem and are currently working on the solution. Again, we apologize for this inconvenience.

The problem has been identified to be affecting only indicators displayed on a separate panel.  A temporary workaround would be to modify the indicator to be overlayed on the chart.

  [Indicator(IsOverlay = true)]

 

For the tick chart indicator the workaround solution would be to access Symbol properties such as Ask and Bid via the Depth of Market. Other Symbol properties such as the Symbol code, pipsize may be input parameters or hardcoded.

TickChart Modified code:

using System;
using cAlgo.API;

namespace cAlgo.Indicators
{
    [Indicator(ScalePrecision = 5, IsOverlay = false)]
    public class TickChart : Indicator
    {
        [Parameter("Symbol Code", DefaultValue = "EURUSD")]
        public string SymbolCode { get; set; }

        [Parameter("PipSize", DefaultValue = 0.00001)]
        public double PipSize { get; set; }

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

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

        private MarketDepth depth;
        private double ask;
        private double bid;

        protected override void Initialize()
        {
            depth = MarketData.GetMarketDepth(SymbolCode); // We must explicitly specify symbol code here
            depth.Updated += OnDepthUpdated;
        }

        private void OnDepthUpdated()
        {
            if (depth.AskEntries.Count > 0 && depth.BidEntries.Count > 0)
            {
                ask = depth.AskEntries[0].Price;
                bid = depth.BidEntries[0].Price;

                ChartObjects.DrawText("QuotesLabel", "BID: " + bid + ", ASK: " + ask, StaticPosition.TopCenter);
            }
        }
        private static void ShiftDataSeries(IndicatorDataSeries dataSeries)
        {
            for (var i = 0; i < dataSeries.Count - 1; i++)
            {
                dataSeries[i] = dataSeries[i + 1];
            }
        }

        private static void FillDataSeries(IndicatorDataSeries dataSeries, double value, int startIndex, int count)
        {
            for (var i = startIndex; i < startIndex + count; i++)
                dataSeries[i] = value;
        }

        public override void Calculate(int index)
        {
            if (!IsRealTime)
                return;

            if (!double.IsNaN(Ask[index]))
            {
                ShiftDataSeries(Ask);
                ShiftDataSeries(Bid);
            }

            FillDataSeries(Ask, ask, index, 50);
            FillDataSeries(Bid, bid, index, 50);

            var spread = Math.Round((ask - bid) / PipSize, 1);
            ChartObjects.DrawText("Spread label", "Spread:\t" + spread + " pips", StaticPosition.BottomRight);
        }

        
    }
}




The next release will be between 27/2 and 05/03. 


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 10:22

Thank you for the suggestion. We will add this to cTDN in the future.


@cAlgo_Fanatic

cAlgo_Fanatic
22 Feb 2013, 10:09

Hello Scott, could you please post a screenshot of the desired output for the SMA? 

Regards


@cAlgo_Fanatic