Replies

PanagiotisCharalampous
21 Jul 2022, 10:16

Hi Ahmed,

It will be fixed in the next update of your platform but there is no specific ETA.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
20 Jul 2022, 09:32

Hi colymaxa,

You will need to go through tick data to achieve this. You need to find the exact tick with the specific price. You will need to use the GetTicks() method.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
19 Jul 2022, 13:48 ( Updated at: 21 Dec 2023, 09:22 )

Hi 4valuetrading,

Just press here

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 


@PanagiotisCharalampous

PanagiotisCharalampous
19 Jul 2022, 11:39

Hi MongolTrader,

cTrader Desktop 4.1 is using .Net Framework 4.0. 4.2 and onwards is using .Net 6.0 and the latest version of C#.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
19 Jul 2022, 08:21

Hi there,

It is not possible at the moment.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jul 2022, 15:53

Hi matteoID,

Thanks for reporting this. Our team will investigate it.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jul 2022, 12:42

Hi marktbs,

This is because you need to convert the value you receive, which is in your account's currency, to the base asset value. 40000 is in GBP, you need to find out how many US 30 contracts you can buy for 40000 GBP.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jul 2022, 09:09

Hi Ahmed,

The team has identified the problem and it will be fixed in an upcoming update.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jul 2022, 08:24

Hi there,

What is not working?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jul 2022, 08:18

Hi matheuscabralkk,

No this is not possible.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
18 Jul 2022, 08:17

Hi Liquidity,

Here you go

// -------------------------------------------------------------------------------------------------
//
//    This code is a cAlgo API sample.
//
//    This cBot is intended to be used as a sample and does not guarantee any particular outcome or
//    profit of any kind. Use it at your own risk.
//
//    The "Sample RSI cBot" will create a buy order when the Relative Strength Index indicator crosses the  level 30, 
//    and a Sell order when the RSI indicator crosses the level 70. The order is closed be either a Stop Loss, defined in 
//    the "Stop Loss" parameter, or by the opposite RSI crossing signal (buy orders close when RSI crosses the 70 level 
//    and sell orders are closed when RSI crosses the 30 level). 
//
//    The cBot can generate only one Buy or Sell order at any given time.
//
// -------------------------------------------------------------------------------------------------

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 SampleRSIcBot : Robot
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("Periods", DefaultValue = 14)]
        public int Periods { get; set; }

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

        [Parameter("From", DefaultValue = 7)]
        public int From { get; set; }

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

        private RelativeStrengthIndex rsi;

        protected override void OnStart()
        {
            rsi = Indicators.RelativeStrengthIndex(Source, Periods);
        }

        protected override void OnTick()
        {
            if (Server.Time.Hour >= From && Server.Time.Hour < To)
            {
                if (rsi.Result.LastValue < 30)
                {
                    Close(TradeType.Sell);
                    Open(TradeType.Buy);
                }
                else if (rsi.Result.LastValue > 70)
                {
                    Close(TradeType.Buy);
                    Open(TradeType.Sell);
                }
            }
        }

        private void Close(TradeType tradeType)
        {
            foreach (var position in Positions.FindAll("SampleRSI", Symbol, tradeType))
                ClosePosition(position);
        }

        private void Open(TradeType tradeType)
        {
            var position = Positions.Find("SampleRSI", Symbol, tradeType);
            var volumeInUnits = Symbol.QuantityToVolume(Quantity);

            if (position == null)
                ExecuteMarketOrder(tradeType, Symbol, volumeInUnits, "SampleRSI");
        }
    }
}

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 15:55

Hi ncel01,

 in such case, currency conversion ratio is a constant (equal to 1).

That's not the case and as I explained it is an issue that needs to be fixed :) What you describe is how it should work, but it doesn't work like that at the moment.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 12:09

Hi TheNiatpac,

So can you confirm that there are no exceptions in the log?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 11:52

Hi TheNiatpac,

Do you get any exceptions in the log when the email is sent? Can you provide screenshots of the log?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 11:50

Hi TheNiatpac,

Thanks for the reply. I tested it again in Spotware ver4.3.8.6352  It does work for the second hit, but not for the 3rd time. I'd expect it can work continuously for as many times as I hit. Can you please check again and advise

Works fine for multiple hits too.

And I have another bug report post Email notification not working in 4.3.8 , I've inserted the sample code there. Please help test and advice.

We will reply there.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 09:26

Hi ncel01,

The explanation is the same. The conversion logic applies even if the base asset and the account currency are the same.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 08:07

Hi TheNiatpac,

I tried this and it works fine for me.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 08:02

Hi mtrademg.

Please send us some troubleshooting information the next time this happens. Please paste a link to this discussion inside the textbox.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
15 Jul 2022, 08:00

Hi Dimitri,

You cannot avoid this, since this is the purpose of a stop limit order. Not to be executed if there is not enough liquidity. Stop losses are executed as market orders therefore there is no such possibility.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
14 Jul 2022, 13:10

Hi makhzen,

Yes, your SL and TP need to be rounded.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous