PanagiotisCharalampous's avatar
PanagiotisCharalampous
26 follower(s) 0 following 1006 subscription(s)
Replies

PanagiotisCharalampous
07 Sep 2022, 08:32

Hi,

You can try something like this

PlaceStopOrder(TradeType.Sell, SymbolName, _lots, Bars.LowPrices.Last(1) - (Symbol.PipSize * 20), _shortlabel, _sl, _tp);

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
07 Sep 2022, 08:19

Hi crou,

Unfortunately it is hard to access the problem without the actual indicator's code.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 16:14

Hi crou,

Can you share the indicator code?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 16:12

Hi Jay,

This happens when the stop loss falls within the spread. The only solution is to check your positions after opening and handle the situation accordingly.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 15:35

Hi Max,

It has been reported again but we haven't managed to isolate the steps either. If you manage to do so, please post them in this thread.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 15:18

Dear moiz.forex,

If you need help with a specific method or you need direction, we are happy to help. But in your post you are asking for a complete cBot, trading in a specific way. If somebody is willing to develop it for free, then I have no objections :)

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 14:41

Hi there,

I am not sure how to make it simpler. You ask me to reverse engineer and debug a 250 lines cBot to understand if there is a problem with the code or with cTrader. Unfortunately I cannot. If you can provide a simpler cBot that has the same problem, I am happy to look at it.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 12:46

Hi there,

What do you mean by small code sample? How do you "Shrink" a code without affecting of it's functionality and what it is actually?

A code example with 10-20 lines ago that can reproduce this discrepancy between 4.1 and 4.2.

And again, if the problem is at the code at all, based on the facts that this exact code working perectly on CT4.1 machine, and it does throws good values on specific WMA96 series, implies strongly again that the problem isn't at the code at all, any maybe at the API or the server i don't know but it's really odd one..

I addressed this im my response above.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 12:27

Hi drewisdad,

This is an issue and will be fixed in an upcoming release.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 12:06

Hi there,

Obviously something has changed in the API between 4.1 and 4.2 but this does not mean it's a bug. But in order to advise where the change is, evaluate if it is a bug or an impreovement, and how address it, I need a small code sample that reproduces the problem. Unfortunately I cannot spend hours undestanding and debugging your code to figure out what is calcuated differently.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 09:57

Hi MongolTrader,

Then use Contains function instead

Positions.Where(p => p.SymbolName.Contains("EURUSD_Buy"))

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 09:00

Hi aranath,

Thank you, we will have a look at this.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 08:45

Hi Vadivelan,

I am still not sure about your requirements but you can try this

 foreach (var pos in Positions.Where(p => Positions.Count(ps => ps.Comment == p.Id.ToString()) == 0))

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 08:23

Hi MongolTrader,

Use the below instead

 Positions.Where(p => p.SymbolName == EURUSD_Buy)

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 08:21

Hi MongolTrader,

See below

 Positions.Where(p => p.SymbolName == SymbolName).Sum(p => p.NetProfit);

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 08:18

Hi again,

You could try contacting the indicator developer to debug this issue.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 08:16

Dear moiz.forex,

If you need somebody to develop this for you, you can reach out to a consultant.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
06 Sep 2022, 08:13

Hi Sebastian,

It really depends on your requirements. cTrader Automate is an API that is b built in inside cTrader Desktop and it's geared towards creating automated strategies and indicators. You cannot use it outside cTrader Deskop. On the other hand, Open API is a more low level but much more versatile API, which you can use to even build your own trading GUI. Just think that cTrader Desktop and cTrader Automate are built on top of an API similar to Open API. So depending on what you are looking to develop, you should choose accordingly.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
05 Sep 2022, 15:46

Hi aranath,

Can you share parameters and dates? I have a hard time reproducing this.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

PanagiotisCharalampous
05 Sep 2022, 15:21

Hi there,

Not sure what you mean. Nothing was removed. Can you share a sceenshot?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous