Replies

PanagiotisCharalampous
11 Oct 2024, 05:20

Hi eynt,

No this information is not available via the API.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:18

RE: RE: RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

PanagiotisCharalampous said: 

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis

Info attached - gees I was hoping I could attach a file containing all the info, but find that option not available above. Can I email it somehow?

 

 

You can send it to community@ctrader.com


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:17

RE: RE: RE: RE: Traders should have access to real VOLUME: sum of all transactions value in a certain time

AiphaSolutions said: 

Thank you for your reply. Would cTrader/Spotware Systems be interested in providing real-time volume data from CME to it's user like a datafeed (which also can be paid for)? I know a few platforms who are doing this already. I have a contact there and could provide. 

Thanks and best

 

PanagiotisCharalampous said: 

AiphaSolutions said: 

Hello, how is it possible for this indicator to show volume, is it also only based on tick-vol ? https://ctrader.com/algos/indicators/show/4379/

 

PanagiotisChar said: 

Hi there,

It's pretty useless and even misleading data, imo. What we all traders need is real volume, sum of all transactions value in a certain time.

As Spotware is in the centre of all trades, it has real volume data.

cTrader is not the centre of all trades. It just streams price feeds from liquidity providers. There is no such info available in OTC markets.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us


 

 

I don't know what the indicator does but probably yes

 

CME volume data is not relevant to OTC markers


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:16

RE: Advanced stop loss

asherm_9 said: 

Hi
Most of the time when I set the advanced stop loss feature to automatically move my stop loss to break even when the set pip target has been reached, it does not work. It simply just removes my stop loss altogether from the trade.
Am I missing something or is there a technical issue here?

 

Thanks 

Hi there,

Make sure the new stop loss does not fall within the spread. If it does, the stop loss cannot be placed.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:14

RE: RE: MarketRangeOrder Errors

910247359 said: 

PanagiotisCharalampous said: 

When the price of US30 is 40,000, I buy US30 using ExecuteMarketRangeOrderAsync(TradeType.Buy, US30, lot, 10, Symbol.Ask + 100, MyLabel, stopLoss, stopLoss * 10, comment); my base price should be 40,100, and the range pips are 10 points. In theory, the transaction should only be executed when the ask price reaches 40,099 or 40,101, but in practice, it is executed immediately. Why is this RANGE restriction ineffective?

Hi there,

No, this is not how it works. Market orders are executed immediately. This is way they are called market orders. If you need a pending order use a Stop Limit order.

Best regards,

Panagiotis

thank you for replying!

The issue I'm encountering is: when placing an market order, marketrangepips can limit negative slippage , but it doesn't limit positive slippage. For example, when I'm buying, the price at the time of order placement is 40,000, and the marketrangepips is set to 10. However, if the price suddenly drops to 4, which is very favorable to me, so it filled at 4, I don't want the order to be executed. It should only be executed within the range allowed by marketrangepips. Does the marketrangepips parameter only limit negative slippage, or does it limit both positive and negative slippage? What I want is that the positive slippage can also be limited though the price is favorable to me, this function can prevent potential reversal after sending an maket order at exceptionally active market conditions

Market range only limits negative slippage.


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:13

Hi there,

Execution issues should be addressed by your broker/prop firm. Please reach out to them.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:11

RE: RE: RE: RE: RE: RE: "TechnicalError" when trying to cancel a pending order

kyosuke said: 

PanagiotisCharalampous said: 

kyosuke said: 

PanagiotisCharalampous said: 

kyosuke said: 

PanagiotisCharalampous said: 

Hi there,

Please contact your broker regarding execution issues.

Best regards,

Panagiotis

Hi, I've already submitted the problem to the borker (IC Markets) which redirected me to you because they said “The error does not provide more details in order to investigate further from our side”.

There not much information for us either. If you can share your source code and steps to reproduce this issue, we are happy to have a look

Problem is not systematic, it can't be reproduced. The bot works well except once every X days this problem occurs and must be a server side problem. It is just happened again (twice):

The only thing I can notice is that, the hour is almost the same.

The portion of code which closes pending orders is quite simple:

foreach (var order in PendingOrders)	if (		order.Label == _BotLabel		&& order.SymbolName == SymbolName		&& order.Comment == Comment	) CancelPendingOrder(order);

Hi there,

It's hard to help you in the forum. The broker needs to check why the orders are not cancelled.

Best regards,

Panagiotis

Hi Panagiotis, what if I now have also some “EntityNotFound” error? Maybe you can dig further in this kind of issue?

This error means that you are trying to cancel an order thar does not exist anymore (probably cancelled already). Check your cBot's logic


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:09

Hi there,

Please provide more information about your issue. What is the actual problem? Do you receive any messages?

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
11 Oct 2024, 05:07

Hi there,

This usually happens when your account is disconnected. When the buttons are disabled, check your connection.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 12:51

RE: RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Sorry somehow I stuffed up the forum formatting… Arghhh… Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. I am running BlackBull v 5.0.38.32105. (JUMP to the conclusion at the bottom if the whole process (most likely) bores you.

All tests were on the EURUSD.

  1.    I tried a new bot, RSI Sample, and carefully made my tests. All worked perfectly.
  2.    I went back to my original bot, "Macd & Rsi Strategy", deleted it and reinstalled.  Changed no parms.
  3.    Set the BackTest (BT) date parms… 01/09/2024 - 09/10/2024.
  4.    Ran BT, checked to make sure no open positions. Profit(P) = 201.36
  5.    Setup Optimisation (OPT) set dates again, unticked ALL parms, set TimeFrame(TF) to h1;h4, 
  6.    Ran OPT, Ph1=201.36, Ph4=-204.52.
  7.    Set OPT parms again, to m30;m45;h1. Checked my dates again, and ran. Chose the m45 OPT line (P=-894.90) clicked APPLY.
  8.    Noted correct change in left panel instance. 
  9.    Ran BT :  Pm45=-786.98.  Aha…. DIFFERENT. 
  10.   Compared the BT/OPT trade lists, and the number of trades varied, one was 17, one was 18 (both no open pos's), and the last two trades opentimes, etc were all different. Nearl;y all the parms did not match. It's like that run used a different time window, or different source parms.  I also noted several of the openTimes in the OPT list were all set to 00:00:00.
  11.  From the OPT lines, I APPLIED and BT'd the h1 timeframe… same as always…. 201.36.
  12.   I tried OPT on several values.. m30;m45;h1;h2;h3;h4.  The m45 reported the correct matching BT value: Pm45=-786.98. Selected it - APPLY - BT - P=-786.98. Perfect.
  13.  I thought WTF?  This is a prick of a bug.  Must be the combination of values… M30;m45;h1. OPT'd them and all was perfect.
  14.  So I went back to the beginning, deleted the bot, closed CTrader, reopened it, reinstalled.
  15.   Setup the same tests… BT- set dates.  (I noticed the remembered FROM date was 09/09/2024, not 01/09/2024. The remembered end date was correct at 09/10/2024.
  16.   Reset the BT start date, ran the BT - Ph1=201.36 same so far.
  17.  OPT - Noted same date issue, fixed that, set OPT values to h1;h4, and ran.  Ph1 = 201.36, Ph4= -204.52. matches for all my tests.
  18.  OPT - set TF values to m30;m45,h1.  Ran again, m30 and h1 P values same as along. m45 value was the bum value… -894.90.
  19.  Subsequent OPT's and the bum value remains.
  20.  I'm tired but I just had a thought…. Set the left panel timeframe to h1 and run an OPT with the TF parms set to m30;m45,h1. 
  21.   Now, Set the left panel timeframe to m45 and run the same OPT… and you get the correct value! 
  22.   One more test… set the left panel timeframe to m45, run, set it to m20  and run again… the same OPT…  all P values are correct.
  23. Set the left panel to h1, OPT again, and the Pm45 value of -894.90 is wrong. 
  24. CONCLUSION: the bug has to do with the OPT TimeFrame combo of m30;m45,h1, and the left panel setting of h1.
  25. Hope that helps!

 

Hi,

I still need the information I asked for to reproduce the problem.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 12:42

RE: RE: RE: When a bot was "unexpectedly terminated", cTrader shows the bot as still running

zossles said: 

PanagiotisCharalampous said: 

 

Hi firemyst,

We were able to reproduce this some days ago and we are working on a solution.

Best regards,

Panagiotis

 

It's still happening for us. Any ETA's on a fix? Another week? Month? 

We do not have an ETA unfortunately. It will be released in one of the following updates


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 10:43

Hi there,

Make sure you are using the .Net 6.0 compiler


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 10:41

RE: RE: RE: Backtester/Optimiser not matching with same parameters

davidrob said: 

davidrob said: 

PanagiotisCharalampous said: 

Hi there,

Make sure that the backtesting settings are the same. 99% of the times it happened this to me it was caused by some oversight in my backtesing settings. If there is still a problem, then we will need to following information in order to reproduce the problem

  • cBot code
  • Optimization parameters file, symbol, timeframe and dates
  • The exact set of parameters for which the discrepancy is observed

Best regards,

Panagiotis

Hi, Thanks your response, I will try a third evening to figure this issue out, starting from scratch on a different cBot, and report back.

Ok, another couple of hours and I managed to reproduce the issue. I am sure it is a bug (I am a programmer myself). Two solid pages of notes in fine print… I will try to best explain it, maybe you can reproduce it. I am old to debugging, but new to forums, so please advise if I should do something differently. 

1.

Hi there,

There is no information in your message.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 10:40

RE: RE: RE: from price to %

kralkundicek said: 

fonziinator said: 

patrik.skate said:

Or please add another function - from price to % .. If you made 1% or lost 1%

any update???

 

update?????

What update do you need?


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 07:04

When the price of US30 is 40,000, I buy US30 using ExecuteMarketRangeOrderAsync(TradeType.Buy, US30, lot, 10, Symbol.Ask + 100, MyLabel, stopLoss, stopLoss * 10, comment); my base price should be 40,100, and the range pips are 10 points. In theory, the transaction should only be executed when the ask price reaches 40,099 or 40,101, but in practice, it is executed immediately. Why is this RANGE restriction ineffective?

Hi there,

No, this is not how it works. Market orders are executed immediately. This is way they are called market orders. If you need a pending order use a Stop Limit order.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 06:59

Hi there,

This will be added in a future update of the application.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 06:57

RE: RE: Bars.LoadMoreHistory() in backtesting

dudavianna said: 

PanagiotisCharalampous said: 

Hi there,

Bars.LoadMoreHistory() does not work for backtesting at the moment. This feature will be added in a future release of cTrader.

Best regards,

Panagiotis

Thanks a lot!

One additional question: Previously, the Bars.OpenTimes.Count method brought more than 3,000 candles to the index. Today, I notice it is only bringing 200.

Has there been any change?

No there was no change. 


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 06:56

RE: RE: Read Market Data

Chat GPT write it.

:)

If you don't know how to code, it's better to assign the job to a professional developer. This code is nonsense.


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 06:55

RE: RE: Créer une nouvelle fenêtre de commande

ulric.selame said: 

PanagiotisCharalampous said: 

Hi there,

Please use English language and use screenshots/videos to explain your issue.

Best regards,

Panagiotis

Hello, When I try to create a new order, nothing happens. I can't find a way to open the new order window, the only way to open trades is to use the gadget in the chart.

An error message is displayed


 

Hi there,

Please share screenshots/videos so that we can see what you are doing and what error you receive.

Best regards,

Panagiotis


@PanagiotisCharalampous

PanagiotisCharalampous
10 Oct 2024, 06:53

Hi there,

Yes it is. If you google it you will find some already developed.

Best regards,

Panagiotis


@PanagiotisCharalampous