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.
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.
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.
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.
Please provide more information like your cBot's code, your broker and optimization dates, settings and parameters so that we can reproduce the problem.
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?
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.
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.
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?
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.
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.
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.
This website uses cookies to enhance site navigation, analyze site usage, and assist in our marketing efforts. By clicking “Accept All” you are providing your consent to our use of all cookies. Alternatively, please provide your choice by pressing “Customize Cookies”. For more information, please read our Privacy policy
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