Replies

ctid1412177
13 Oct 2020, 08:51

RE:

PanagiotisCharalampous said:

Hi there,

Can you provide us with the cBot code and steps to reproduce this exception?

Best Regards,

Panagiotis 

Join us on Telegram

Hi,
I have emailed you,
Thanks,

H


@ctid1412177

ctid1412177
29 Jun 2020, 13:02

RE:

PanagiotisCharalampous said:

Hi ctid1412177,

Can you please post the complete indicator code?

Best Regards,

Panagiotis 

Join us on Telegram

 

Hi - This isn't an indicator, I am adding text to a chart which is being run on cAlgo.


@ctid1412177

ctid1412177
02 Apr 2020, 09:42

RE:

PanagiotisCharalampous said:

Hi there,

Can you provide us with the cBot code and instructions how to reproduce this behavior?

Best Regards,

Panagiotis 

Join us on Telegram

Hi,

Sent an email to your account with instructions.  Just so we are clear this is not a backtest problem but when it runs in ON mode.
Thannks,


@ctid1412177

ctid1412177
31 Mar 2020, 15:39 ( Updated at: 21 Dec 2023, 09:21 )

RE:

PanagiotisCharalampous said:

Hi there,

Can you post a screenshot of the relevant code part as below? As you can see I can login without any issues. I have changed nothing from the example application except the proxy and credentials.

Best Regards,

Panagiotis 

Join us on Telegram

I note the difference in the _senderSubID in yours being "QUOTE" and in mine as "3266065", however, I am testing both streams and your own code sample follows a numeric code.  Also, I used the same approach with another account using FX PIG Broker and it worked.  So I am not sure why it does not here?

You can see using a FIX message system what I see
 

Local time UTC +3
Price channel:
2020.03.27 11:27:19.944 Recv         8=FIX.4.49=16235=534=149=cServer50=QUOTE52=20200327-08:27:22.57656=ctrader.326606557=Quote58=TargetSubID is assigned with the unexpected value 'QUOTE', expected 'TRADE'10=205


2020.03.27 11:27:19.764 Send         8=FIX.4.49=13335=A34=149=ctrader.326606556=cServer52=20200327-08:27:19.76450=Quote57=QUOTE98=0141=Y108=30553=3266065554=@PrVwML2KQz6$Wc10=143

Trade channel:
2020.03.27 11:27:20.095 Recv         8=FIX.4.49=16235=534=149=cServer50=TRADE52=20200327-08:27:22.76256=ctrader.326606557=Trade58=TargetSubID is assigned with the unexpected value 'TRADE', expected 'QUOTE'10=142


2020.03.27 11:27:20.018 Send         8=FIX.4.49=13335=A34=149=ctrader.326606556=cServer52=20200327-08:27:20.01850=Trade57=TRADE98=0141=Y108=30553=3266065554=@PrVwML2KQz6$Wc10=067

 

 

 


@ctid1412177

ctid1412177
31 Mar 2020, 11:49

RE:

PanagiotisCharalampous said:

Hi there,

RET_INVALID_DATA indicates a wrong password. Can you please check your password again?

Best Regards,

Panagiotis 

Join us on Telegram

 

I have tried to replicate the approach to a second account and I now have the error
TargetSubID is assigned with the unexpected value 'QUOTE', expected 'TRADE'

I have checked that the correct values are associated

The sample App now no longer runs, it now has a Syste.Net.SocketException - No Such Host is Known

System.Net.Sockets.SocketException
  HResult=0x80004005
  Message=No such host is known
  Source=System
  StackTrace:
   at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
   at FIX_API_Sample.frmFIXAPISample..ctor() in C:\Users\bedih\Source\Repos\FIX-API-Sample\FIX API Sample.cs:line 54
   at FIX_API_Sample.Program.Main() in C:\Users\bedih\Source\Repos\FIX-API-Sample\Program.cs:line 19

Where, _pricePort = "5211" and _host = " h47.p.ctrader.com"

or

Where, _pricePort = "5201" and _host = " h47.p.ctrader.com"


@ctid1412177

ctid1412177
31 Mar 2020, 10:45

Hi,
I tried your suggestion and changed the password  - it did not work, I then changed the ports from 5212/5211 to 5202/5201 (no SSL).  The sample FIX APi now connects.

Thanks


@ctid1412177

ctid1412177
03 Mar 2020, 11:51

RE:

PanagiotisCharalampous said:

Hi ctid1412177,

community@spotware.com.

Best Regards,

Panagiotis 

Join us on Telegram

sent


@ctid1412177

ctid1412177
03 Mar 2020, 11:34

RE:

PanagiotisCharalampous said:

Hi ctid1412177,

We do not see a reason to sign an NDA at the moment. You claim that there is an issue with cTrader not triggering a TP. You need to provide some code that supports this claim. 

Best Regards,

Panagiotis 

Join us on Telegram

What is your email address?


@ctid1412177

ctid1412177
03 Mar 2020, 11:27

RE:

PanagiotisCharalampous said:

Hi ctid1412177,

We need a fully working cBot that will allow us to reproduce the behavior on backtesting. Else we cannot know what is causing this behavior.

Best Regards,

Panagiotis 

Join us on Telegram

Send me your NDA?  Can you tell me your email address?


@ctid1412177

ctid1412177
03 Mar 2020, 11:04 ( Updated at: 21 Dec 2023, 09:21 )

RE:

PanagiotisCharalampous said:

Hi ctid1412177,

If this happens and can be reproduced on backtesting, please provide the cBot code, cBot parameters and backtesting settings so that we can reproduce the problem and let you know what happens. If this happened on live execution, please contact your broker.

Best Regards,

Panagiotis 

Join us on Telegram

 

Thanks, Panogotis,
This can be reproduced consistently in backtesting.  The account is Spotware and we are not dependant on a broker.  The strategy relies on multiple inputs, some of which are entirely proprietary and can not be disclosed unless you are prepared to sign an NDA?

//Our order send is:

  private void sendLimitOrder(TradeType tType, bool isBuyer, string comment, string label, double entryPrice, double takeProfitPrice, double stopLossPrice)
        {
            positionCheck();
            if (canTrade == true)
            {
                var result = PlaceLimitOrder(tType, SymbolName, getVolume(), entryPrice, label, getStopLoss(isBuyer, entryPrice, stopLossPrice), getTakeProfit(isBuyer, entryPrice, takeProfitPrice), null, comment, false);
                if (result.IsSuccessful == true)
                {
                    var position = result.PendingOrder;
                    Print("Position entry price is {0}", position.TargetPrice);
                }
            }
        }
//Stop Loss
  private double getStopLoss(bool isBuyer, double price, double stopLossPrice)
        {
            double pips = 0.0;
            if (isBuyer == true)
            {
                pips = Math.Floor(Math.Round(price - stopLossPrice, Symbol.Digits) * 10000);
            }
            else
            {
                pips = Math.Floor(Math.Round(stopLossPrice - price, Symbol.Digits) * 10000);
            }

            return pips;
        }
//Take Profit
   private double getTakeProfit(bool isBuyer, double price, double takeProfitPrice)
        {
            double pips = 0.0;
            if (isBuyer == true)
            {
                pips = Math.Floor(Math.Round(takeProfitPrice - price, Symbol.Digits) * 10000);

            }
            else
            {
                pips = Math.Floor(Math.Round(price - takeProfitPrice, Symbol.Digits) * 10000);
            }
            return pips;
        }

 

The chart clearly shows a low well in excess of the TP level.

 

A similar situation where the short was added.  Take profit failed to execute, but a new sell order was triggered and the take profit on that order was executed at a much lower price action.

 

 

Kind regards,


@ctid1412177