Replies

Symposium
18 Mar 2023, 05:39 ( Updated at: 21 Dec 2023, 09:23 )

RE: Build with Source Code

Hi Pro Trader, You have to Build your Algo's with the Build with Source Code tab... This will make the code editable on other computers...

The code is available in text form (open in Notepad) in the *.cs file inside the Algo's project folder...

Hope this is of help...


@Symposium

Symposium
09 Jan 2023, 15:15

RE:

Thanks for your help Xammo, the install issue maybe an issue for me as the Broker specific file (Pepperstone) is not installing either.... This 4.1 issue is a total P.I.A.... ????

 


@Symposium

Symposium
09 Jan 2023, 14:28 ( Updated at: 21 Dec 2023, 09:23 )

RE:

Xammo said:

I just tried hitting Ctrl+Alt+Shift+T in 4.5.1 and downloaded and installed 4.1 and get this when trying to login (looks spotware has tried to make 4.1 multi broker as it has the spotware logo?! and is also showing as Public Beta top left)

which is totally different from the 4.1 broker specific version I have been using fine for many months

Please Spotware give us a clue what is going on!

I removed all versions of Ctrader (including AppData files), kept the Source and Template folders... Downloaded Ctrader from the Home Page link and it won't even install.....

What the hell is going on? TradingView is looking better and better....


@Symposium

Symposium
09 Jan 2023, 13:41

RE: RE:

luca.vangelisti said:

same for me. I manually updated and now it’s all ok.

How do you manually update? Reinstall Ctrader?

 

 

 


@Symposium

Symposium
09 Jan 2023, 13:03 ( Updated at: 09 Jan 2023, 13:06 )

Have had the same issue with both Pepperstone and IC Markets since the 7th Jan when trying to use version 4.1.... (4.1 refuses to Update!!)

Release 4.3 onward connects without issue.... 

Come on Spotware, this is blocking many users... Get off your collective backsides and either respond or fix this issue!!

 

 Hi Panagiotis, have tried the reg.fix update for Win10.... This did not fix the connection issue.


@Symposium

Symposium
22 Jun 2021, 02:57 ( Updated at: 22 Jun 2021, 03:01 )

Include User timezone in indicator

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

//Timezone AEDST 1 TimeZone = TimeZones.CentralPacificStandardTime (UTC +11)
//Timezone AEST 2 TimeZone = TimeZones.EAustraliaStandardTime (UTC +10)

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

Hi khoshroomahdi, you need to find your TZ (UTC) under TimeZones in the automate menu (right side of screen). As seen above I notate UTC+11 and UTC +10 (Australia) above the Indicator code so it is just a matter of cut and paste when day light saving time applies.

Hope this is of help. Cheers


@Symposium

Symposium
16 Aug 2020, 13:15

RE: Platform updates

firemyst said:

 

TWB: you missed the point. The number of indicators is irrelevant. It's the number of clicks users have to go through now for indicators cTrader doesn't allow you to click on to remove, that provides valuable information or functionality cTrader lacks.

Let's say you have just two indicators. Or better yet, let's just say one. Use the example one I linked to above.

Add it to your chart.

Now see how you can delete it without going through an indicator's menu.

I rest my case.

There are numerous indicators out there like this people use.

It now takes more time for users to accomplish the same action than previously.

That's not good UI design principles.

PS: if you think Trading View is the only other app, you obviously haven't looked at Pro Real Time or ThinkTrader. :-)

 

Firemyst..... Why are you going all the way to in to the object manager panel?

You do realise that if you <Right Click> on the Indicator on the Chart.... BB, PSAR, Supertrend..... it opens up the Indicator's settings/Parameter popup and you can delete it from the new button added to this panel...... 2 clicks of your mouse...   

No need to go anywhere near the OMP...... I can clear 6 Indicators in less than 7 seconds.....

If Pro Real Trader and ThinkTrader are so superior..... why are you using Ctrader??

Tradingview has the benefit of the traders, ideas, information ecosphere....


@Symposium

Symposium
15 Aug 2020, 07:34

RE: Platform updates

 

Firemyst... Are you serious?...... 15 Indicators on any chart is your issue!..... Not Spotware's..... They have added a delete button to the Indicators popup panel....

<Left click>, <Right click>....  Indicator Gone!.....  Makes removal of any unwanted Indicators simple. A great update to the Platform. The only other Platform (Retail) even on the same page as Ctrader is TradingView's

TWB


@Symposium

Symposium
04 Aug 2020, 13:28

RE: HighMinusLow Indicator

jensnig said:

I regularly keep track of daily price movements in my collection of 45 charts. So far I simply measure manually the highs and lows for a given day. This is not very precise and also tedious work every morning. As I am not in a position to programm the HighMinusLow() function myself, I wonder if somebody has already done so and would like to share this little indicator with the community. I should be thankful for any comments.

Jens

Hi Jensnig, a simple version can be found at the following link: 

 


@Symposium

Symposium
14 Jul 2020, 18:38

Candle Thickness

Hi Hahoob.af, you have to adjust the Candle (and Wick) thickness using the parameters for each.... ie Zoomed in requires a lower number, Zoomed out a higher number.

Hope this Helps. TWB


@Symposium

Symposium
13 Jun 2020, 09:38

Close all symbols when profit-hight is reached

There is an existing Bot called GlobalTPPlus (www.swingfish.trade) which uses this logic and can be found at the link below....

https://ctrader.com/algos/cbots/show/1664

Hope this is of help. TWB


@Symposium

Symposium
27 May 2020, 07:14 ( Updated at: 21 Dec 2023, 09:22 )

RE: Quad(4) MA Indicator........

Add's all 4 EMA's to your chart, MA Type can be changed to SMA, EMA, TMA, WMA, WWMA or VIDYA Style...... Hope this helps.....

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

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

        [Parameter(DefaultValue = 28)]
        public int Period1 { get; set; }

        [Parameter(DefaultValue = 50)]
        public int Period2 { get; set; }

        [Parameter(DefaultValue = 100)]
        public int Period3 { get; set; }

        [Parameter(DefaultValue = 200)]
        public int Period4 { get; set; }

        [Parameter("Moving Average Type", DefaultValue = MovingAverageType.Exponential)]
        public MovingAverageType MAType { get; set; }

        [Parameter()]
        public DataSeries Source { get; set; }

        [Output("28 MA", Color = Colors.Lime, LineStyle = LineStyle.Lines, Thickness = 2)]
        public IndicatorDataSeries Result1 { get; set; }

        [Output("50 MA", Color = Colors.Green, LineStyle = LineStyle.Lines, Thickness = 2)]
        public IndicatorDataSeries Result2 { get; set; }

        [Output("100 MA", Color = Colors.Red, LineStyle = LineStyle.Lines, Thickness = 2)]
        public IndicatorDataSeries Result3 { get; set; }

        [Output("200 MA", Color = Colors.DarkRed, LineStyle = LineStyle.Lines, Thickness = 2)]
        public IndicatorDataSeries Result4 { get; set; }

        private MovingAverage _MovingAverage1;
        private MovingAverage _MovingAverage2;
        private MovingAverage _MovingAverage3;
        private MovingAverage _MovingAverage4;


        protected override void Initialize()
        {
            _MovingAverage1 = Indicators.MovingAverage(Source, Period1, MAType);
            _MovingAverage2 = Indicators.MovingAverage(Source, Period2, MAType);
            _MovingAverage3 = Indicators.MovingAverage(Source, Period3, MAType);
            _MovingAverage4 = Indicators.MovingAverage(Source, Period4, MAType);

        }

        public override void Calculate(int index)
        {

            Result1[index] = _MovingAverage1.Result[index];
            Result2[index] = _MovingAverage2.Result[index];
            Result3[index] = _MovingAverage3.Result[index];
            Result4[index] = _MovingAverage4.Result[index];
        }
    }
}

 


@Symposium

Symposium
26 May 2020, 08:00

RE: Link to VWAP Indicator

 

 

Mario from Swingfish.com has built a great version of the VWAP Indicator at the link above..... 


@Symposium

Symposium
24 May 2020, 05:53

You may have already seen this, but a good CSM Indicator for Ctrader is a available from this developer.     https://ctkit.uk/viewer/csi

Along with some other creative indicators and tools for Ctrader 3.7


@Symposium

Symposium
13 May 2020, 14:48

RE:

Wow.... Thank you Panagiotis, Hopefully It will be a useful piece of coding for many using the impressive Ctrader Platform.... 

PS... I'm a member.... We've chatted in the Telegram room a while back.... Haven't been logged in for a while... StaySafe and Many Thanks again.

 

 

 


@Symposium

Symposium
15 Oct 2019, 06:16

RE:

IGForex said:

Hi Panagiotis, 
I think it is absurd calculation because ,10 ten lot sell position summing upto 100 lots will determmine market direction compared to 90 micro lot buy positions summing upto 0.9 lot. But still market sentiment will show up like 90% buying. Wouldn't you agree ? I say this because recently I noticed many symbol showing 90 + % open buy or sell positions and price goes opposite. THis is a useless feature or even misleading.

Thanks

IGForex, all data can be useful in these markets...... maybe look at sentiment when volumes are generally low (Asian, Early Monday, Late Friday Sessions) and you may notice the contrarians (or LP's) trading the opposite direction to market sentiment......

Possible strategy? Useful? Think about it........ Definetly not absurd.......


@Symposium

Symposium
05 Aug 2019, 07:41

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 SampleTrend : Robot
    {
        [Parameter("MA Type")]
        public MovingAverageType MAType { get; set; }

        [Parameter()]
        public DataSeries SourceSeries { get; set; }

        [Parameter("Fast Period", DefaultValue = 5)]
        public int FastPeriods { get; set; }

        [Parameter("Slow Period", DefaultValue = 10)]
        public int SlowPeriods { get; set; }

        [Parameter("Quantity (Lots)", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
        public double Quantity { get; set; }

        [Parameter("Stop Loss (pips)", DefaultValue = 0.01, MinValue = 0)]
        public int StopLossInPips { get; set; }

        [Parameter("Take Profit (pips)", DefaultValue = 10, MinValue = 1)]
        public int TakeProfitInPips { get; set; }


        private MovingAverage slowMa;
        private MovingAverage fastMa;
        private const string label = "Sample Trend cBot";

        protected override void OnStart()
        {
            fastMa = Indicators.MovingAverage(SourceSeries, FastPeriods, MAType);
            slowMa = Indicators.MovingAverage(SourceSeries, SlowPeriods, MAType);
        }

        protected override void OnTick()
        {

            {
                var longPosition = Positions.Find(label, SymbolName, TradeType.Buy);
                var shortPosition = Positions.Find(label, SymbolName, TradeType.Sell);

                var currentSlowMa = slowMa.Result.Last(0);
                var currentFastMa = fastMa.Result.Last(0);
                var previousSlowMa = slowMa.Result.Last(1);
                var previousFastMa = fastMa.Result.Last(1);

                if (previousSlowMa > previousFastMa && currentSlowMa <= currentFastMa && longPosition == null)
                {
                    if (shortPosition != null)
                        ClosePosition(shortPosition);
                    ExecuteMarketOrder(TradeType.Buy, SymbolName, VolumeInUnits, label, StopLossInPips, TakeProfitInPips);
                }
                else if (previousSlowMa < previousFastMa && currentSlowMa >= currentFastMa && shortPosition == null)
                {
                    if (longPosition != null)
                        ClosePosition(longPosition);
                    ExecuteMarketOrder(TradeType.Sell, SymbolName, VolumeInUnits, label, StopLossInPips, TakeProfitInPips);
                }

            }
        }

        private long VolumeInUnits
        {
            get { return Symbol.QuantityToVolume(Quantity); }
        }
    }
}

I have coded a version with a Trailing Stop, Let me know if you want it.? For the code above.. I have added the SL as well... just set it to zero if it's not being used....

Hope this is of help... Cheers


@Symposium

Symposium
30 Jul 2019, 13:45

RE:

Panagiotis Charalampous said:

Hi Symposium,

Did you check the logs? Are the orders executed?

Best Regards,

Panagiotis

Yes, I backtest with the log tab open... It's mixed in with some other code, and I think maybe clashing is now the issue.... My coding ability is only mediocre so, I'll go back and take a look what is different in the last few algo's I have constructed.... appreciate your help... gratefull as always....

Hey, the new 3.5 version is so much better on memory and can be left running for days without issue... Cheers 


@Symposium

Symposium
30 Jul 2019, 11:18

RE:

Panagiotis Charalampous said:

Hi Symposium,

I just tried it and worked fine. 

Best Regards,

Panagiotis

Thanks Panagiotis.... it must be something I'm doing.... wasn't sure... Thanks for checking it... Cheers.


@Symposium

Symposium
30 Jul 2019, 10:22

RE:

Panagiotis Charalampous said:

Hi Symposium,

Can you please explain what do you mean it doesn;t work? What do you expect it to do, what does it do instead and how can we reproduce the behavior?

Best Regards,

Panagiotis

Yes, The Utility tracks the profit (CashTarget) of a position and when that parameter is met ie: say $20.00 the Bot closes all positions and stops. The utility no longer stops the Bot when the Parameter is reached... it continues to trade.


@Symposium