Topics
Replies
PanagiotisCharalampous
25 Mar 2024, 07:22
RE: RE: Advanced Take Profit calculations are wrong
matveualekseev03 said:
PanagiotisCharalampous said:
Hi timosilver,
Your comment does not make much sense to me. Can you provide examples of what do you thing is wrong?
Best regards,
Panagiotis
Hi, I have the same problem. The take profit is 2 times less than it should be or so. For example, I place an order with a market with a fixed take of 1 to 4, after the price reaches the take, my profit is not 1 to 4, but 1 to 2 or 1 to 3. It's smaller than it should be. Help please
Hi there,
You need to refresh your math a bit :) It would be 1:4 if you started from 0%. But you start from 100% so it is 1:3.
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 07:18
Hi there,
cTrader does not add brokers to the platform. It's the brokers that add platforms to their offerings. So it is better to talk to the broker regarding this.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 07:16
Hi there,
We did not change anything, we just propagate what we receive from the liquidity providers. Each liquidity provider has its own logic in streaming price feeds.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 07:10
RE: RE: Is it possible in C bot?
flappiyt said:
firemyst said:
TO change the volume, use the ModifyVolume ;
To close a position entirely, use the Close method.
Hi firemyst
I have no idea how to use ModifyVolume
Could you please help me to implement it into my code?
I tried something like this but it fails
if (!isPartialCloseExecuted && isAlreadyInTrade)
{
double closePositionSize = positionSize * 0.5;
public abstract TradeResult ModifyVolume(double closePositionSize)
isPartialCloseExecuted = true;
}
Hi there,
Here is an example
var position = ExecuteMarketOrder(TradeType.Sell, SymbolName, 2000).Position;
position.ModifyVolume(1000);
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 06:53
Hi there,
You can develop a simple cBot for this (or have a professional develop it for you). This is not something that will find it's way as a built in feature of the platform.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 06:51
Hi there,
Please provide more information like your cBot's code, your broker and optimization dates, settings and parameters so that we can reproduce the problem.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 06:50
Hi there,
Trading times are configured by brokers. Please contact your broker regarding this matter.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 06:49
Hi there,
Symbols are offered by brokers. Please contact your broker regarding this matter.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 06:48
Hi there,
Please provide more information about this issue e.g. broker, symbol, screenshots and/or videos demonstrating what you are looking at.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 06:46
Hi there,
You need to provide more information on your request if you expect to receive any help. Which trade options panel are you referring to? What do you expect to happen and what happens instead?
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2024, 05:56
Hi there,
Your code logic is wrong. Your code does not do the below
I would like the buy/sell position to start as soon as the oposite SAR is touched
Your code just places trades when the price is above or below the current psar value, which is always true. You should check for crosses instead e.g. the close price being above while the open price is below.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2024, 05:45
Hi there,
You need to ask specific questions to get specific answers. Leaving the code and waiting that somebody will finish the job for you will not get you much help as community members are busy with their own projects.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
23 Mar 2024, 05:42
Hi timosilver,
Your comment does not make much sense to me. Can you provide examples of what do you thing is wrong?
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Mar 2024, 14:53
Hi there,
Trading times are set by the broker. You should talk to your broker about this.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Mar 2024, 14:53
RE: RE: difference between web and desktop
rvandez said:
PanagiotisCharalampous said:
Hi there,
The two applications are developed independently so as soon as a feature is ready on one of them, it is released without having to wait for the rest to have it as well.
Best regards,
Panagiotis
OK, do you know when the risk reward tool will be available on the desktop?
It is currently under development
@PanagiotisCharalampous
PanagiotisCharalampous
22 Mar 2024, 14:50
Hi there,
This happens because Calculate() method is called for historical bars as well. If you don't want to call it for historical bars, you can use IsLastBar to check that you are on the last bar.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Mar 2024, 12:55
RE: App Ctrader mobile Crashes after Android 14 update
ncel01 said:
What's the status here?
When can we expect any answers on this?
Thanks for informing!
Hi ncel01,
We are releasing a fix soon.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Mar 2024, 08:17
Hi there,
The two applications are developed independently so as soon as a feature is ready on one of them, it is released without having to wait for the rest to have it as well.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 Mar 2024, 08:15
RE: RE: RE: RE: Is it possible in C bot?
flappiyt said:
PanagiotisCharalampous said:
flappiyt said:
PanagiotisCharalampous said:
Hi there,
Yes it is. You need to calculate your candle's duration and then detect when the upcoming closing time is closer that 10 seconds, then execute your logic.
Best regards,
Panagiotis
Hi Panagiotis
Could you please tell me how to do that? Do I have to start the bot at the exact hour, like 15:35:00, and then calculate it, or is there an easier way? The bot will be opening trades on a 5-minute chart.
I have created a bot like this, but it only prints "Green candle" after the candle closes; it prints it at exact hours not 10 s before.
using System;
using cAlgo.API;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC)]
public class BOT : Robot
{
int PeriodInSeconds = 300;
int Seconds = 10;
protected override void OnBar() // On tick doesn't work either
{
var timeToClose = PeriodInSeconds - (Server.Time - MarketSeries.OpenTime.Last(1)).TotalSeconds;
if (timeToClose <= Seconds)
{
var lastCandle = MarketSeries.Open.Last(1);
if (lastCandle > MarketSeries.Close.Last(1))
{
Print("Green candle");
}
}
}
}
}
Hi there,
Unfortunately I cannot write the code for you. If you need professional assistance, you can contact a consultant
Best regards,
Panagiotis
Hi Panagiotis
I don't want you to write code for me, I only want to ask what methods are used to implement this in C#.
There is no specific method. You need to write the logic yourself. You need to find the candle duration based on bar open times and then keep track of the time elapsed in each candle. When the specified time has elapsed, you need to execute your logic. The only way to help you further is to write the code for you.
@PanagiotisCharalampous
PanagiotisCharalampous
25 Mar 2024, 07:28
Hi there,
This happens because you do not acquire the text box value anywhere. See below
You acquire the sl and tp from the text boxes but you use the default label and comment.
Best regards,
Panagiotis
@PanagiotisCharalampous