velu130486
Topics
Replies
velu130486
02 Jun 2020, 09:10
RE:
Thanks Panagiotis for quick reply. If I am using code on Ticks() with the following means
if (_stoch.PercentD.HasCrossedAbove(_stoch.PercentK, 10))
If will check STO is crossed above or not based on last 10 tick values. is it correct?
Thanks and Regards
R. Vadivelan
PanagiotisCharalampous said:
Hi Vadivelan,
Here it is
if (_stoch.PercentD.HasCrossedAbove(_stoch.PercentK, 0)) { // Do something }
Best Regards,
Panagiotis
velu130486
02 Jun 2020, 08:58
RE:
Hi Panagiotis,
Thanks for your reply. HasCrossedAbove() will also work for Stochastic Indicator, Could you please share me the sample coding to check whether it has crossed above or not?
Thanks and Regards
R. Vadivelan
PanagiotisCharalampous said:
Hi Vadivelan,
It is your decision where the check will take place, in OnTick() or in OnBar(). To check crosses, you can use HasCrossedAbove() and HasCrossedBelow() methods.
Best Regards,
Panagiotis
velu130486
02 Jun 2020, 08:43
RE:
Hi Panagiotis,
If I use IsRisingK/IsFallingK in my Cbot Code, the value will be checks on Ticks() or On Bars. If I want to check the value on Bars means how I can use the Code.
Is there any function available to check STO %D has crossed above %K same like EMA?
Thanks and Regards
R. Vadivelan
PanagiotisCharalampous said:
Hi there,
1. There is no difference between kClose > kPreviousClose and isRisingK
2. The period in HasCrossedBelow() indicates how many periods backwards does the method needs to check for a crossover.
Best Regards,
Panagiotis
velu130486
25 May 2020, 15:01
RE:
Hi Panagiotis,
Thanks for your quick reply. Now its clear.
PanagiotisCharalampous said:
Hi Vadivelan,
Yes this is correct.
Best Regards,
Panagiotis
velu130486
25 May 2020, 14:57
RE:
Hi Panagiotis,
Thanks for your reply. That means I no need to use both kClose > kPreviousClose and isRisingK in the Cbot, I can use any one right.
For the the CrossedBelow(), if I input 10 means it will check for last 10 candles to check the crossover is happened or not, if the crossover not happened in last 10 bars means no signal is generated right
Thanks and Regards
R. Vadivelan
PanagiotisCharalampous said:
Hi there,
1. There is no difference between kClose > kPreviousClose and isRisingK
2. The period in HasCrossedBelow() indicates how many periods backwards does the method needs to check for a crossover.
Best Regards,
Panagiotis
velu130486
01 Apr 2020, 08:37
RE:
velu130486 said:
Dear All,
I got the below code for drawing Fibonacci lines into the chart from this forum. This Indicator will help me to draw the Fibonacci automatically based on last 100 Candle High Low, however I required your support to modify the coding to draw the Fibonacci lines based on last 100 - X candles (say 15).
Also this code does not draw the Fibonacci Extension levels, please help me to draw the same automatically
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; using System.Collections.Generic; { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class Autofibo : Indicator { [Parameter("Look Back Period ", DefaultValue = 100)] public int lookback { get; set; } [Parameter("Series Timeframe")] public TimeFrame tf { get; set; } private MarketSeries series1; protected override void Initialize() { // Initialize and create nested indicators series1 = MarketData.GetSeries(tf); OnTimer(); Timer.Start(60); } protected override void OnTimer() { // Initialize and create nested indicators //find index var hidate = Time.Date; var lodate = Time.Date; var superhi = MarketSeries.Close.LastValue; var superlo = MarketSeries.Close.LastValue; var highval = series1.High; var loval = series1.Low; for (var i = 0; i < lookback; i++) { //find hi if (highval.Last(i) > superhi) { superhi = highval.Last(i); hidate = series1.OpenTime.Last(i); } //findlo if (loval.Last(i) < superlo) { superlo = loval.Last(i); lodate = series1.OpenTime.Last(i); } var bull = (hidate > lodate) ? true : false; var datechosen = (bull) ? lodate : hidate; //set value of line List<double> level = new List<double> { 0.0, 23.6, 38.0, 50.0, 61.8, 100 }; var now = MarketSeries.OpenTime.LastValue; var distance = superhi - superlo; //drawline foreach (var lev in level) { var dev = lev / 100 * distance; var val = (bull) ? superhi - dev : superlo + dev; ChartObjects.DrawLine(lev + "%", datechosen, val, now, val, (bull) ? Colors.Red : Colors.Blue, 1, LineStyle.Solid); ChartObjects.DrawText(lev + "% text", lev + "%", MarketSeries.OpenTime.Count + 1, val + 0.5 * Symbol.PipSize, VerticalAlignment.Center, HorizontalAlignment.Right, (bull) ? Colors.Red : Colors.Blue); } } } public override void Calculate(int index) { // Calculate value at specified index // Result[index] = ... } } }
Dear All,
Could you please help me to fix this.
Thanks and Regards
R. Vadivelan
velu130486
04 Mar 2020, 12:05
( Updated at: 21 Dec 2023, 09:21 )
RE:
Hi Panagiotis,
Thanks for your quick reply.
Please help me to modify the Cbot to work in multiple timeframes (i.e.) Cbot to run based on Chart Timeframe. I hope remaining part of my coding is fine, but if I want to reference to the indicator (say hull moving average) which is not inbuilt in Ctrader how to include the same. I have the indicator with source code in the indicator folder.
PanagiotisCharalampous said:
Hi Vadivelan,
I backtested your cBot but I cannot see such a behavior. See below a backtesting on m1 chart. Seems fine to me, I do not see positions opening and closing every 4 hours.
Best Regards,
Panagiotis
Thanks in Advance
R. Vadivelan
velu130486
23 Jan 2020, 05:55
RE: TradingView Charting cTrader Trading
ClickAlgo said:
Would like to see a standalone trading platform where you can choose to use either cTrader or a TradingView chart but the data feed and all the trading is with your existing cTrader broker. We have created a proof of concept cBot to demonstrate how it would work, the interface is a basic mock-up and the final version would be a modern user interface. At this stage, we are just gathering community feedback to see if the trader would find this a useful tool.
Please vote by clicking on the thumb below if you would like to see this made a reality.
Paul Hayes
Sales & Marketing
Email: contact@clickalgo.com
Phone: (44) 203 289 6573
Website: https://clickalgo.com
Twitter | Facebook | YouTube | Pinterest | LinkedIn
PS: Why not join our instant chat group on Telegram.
I already tried this, but the Trade view panel is not opening in my computer.
velu130486
20 Dec 2019, 12:37
RE:
PanagiotisCharalampous said:
Hi velu130486,
As I explained above, if you need help with custom development, you can consider posting a Job or contacting a Consultant to develop your cBot.
Best Regards,
Panagiotis
Hi Panagiotis,
I am already in touch with 1 developer and the work is ongoing. In mean time I need this code to minimize my losses.
velu130486
20 Dec 2019, 11:08
RE:
PanagiotisCharalampous said:
Hi velu130486,
If you do not have the cBot code then you can use the cBot below in parallel. This cBot will close all positions of the chart symbol that have loss bigger than the pips specified in the parameters
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { [Parameter(DefaultValue = 100)] public double Pips { get; set; } protected override void OnStart() { } protected override void OnTick() { foreach (var position in Positions.Where(x => x.SymbolName == Symbol.Name)) { if (position.Pips < -Pips) { position.Close(); } } } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
Hi Panagiotis,
Similar to the above code, could you please help me to create a Cbot which will modify the Take Profit and update trailing stop loss on Certain Pips movement. (i.e.) I am executing the trade with Take Profit 10 Pips, so I would like to do the modification on Take Profit and Trailing stop loss by +10 Pips.
velu130486
13 Dec 2019, 12:23
RE:
PanagiotisCharalampous said:
Hi velu130486,
I see that you posted something here and you got a response https://ctrader.com/jobs/764. Did you try contacting them?
Best Regards,
Panagiotis
I already sent the email, infact I also registered in their website earlier but no response till date.
velu130486
13 Dec 2019, 12:10
RE:
PanagiotisCharalampous said:
Hi velu130486,
Did you try contacting the consultants directly?
Best Regards,
Panagiotis
No, I don't find any contact informations. Anyhow I will have a look 1 more time
velu130486
13 Dec 2019, 12:06
RE:
PanagiotisCharalampous said:
Hi velu130486,
It will need some work to add these features in the cBot. You can consider posting a Job or contacting a Consultant to develop a single, tailor made cBot for you.
Best Regards,
Panagiotis
Hi Panagiotis,
Actually I posted my requirement but there is no response. I search over the Internet and got the code suit my requirement but without risk management my account got washed out. So I request your support.
Thanks in Advance.
velu130486
13 Dec 2019, 11:43
RE:
PanagiotisCharalampous said:
Hi velu130486,
If you do not have the cBot code then you can use the cBot below in parallel. This cBot will close all positions of the chart symbol that have loss bigger than the pips specified in the parameters
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { [Parameter(DefaultValue = 100)] public double Pips { get; set; } protected override void OnStart() { } protected override void OnTick() { foreach (var position in Positions.Where(x => x.SymbolName == Symbol.Name)) { if (position.Pips < -Pips) { position.Close(); } } } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
Hi Panagiotis,
Thanks for the code and I just tried it and works fine However it closes all the manual orders also..
Just curious to know is it possible to update the code to include function like Trailing stop in the same code to take the advantage to secure my profit. When I place the manual order I use Trailing stop, However in the Cbot I don't have that option.
velu130486
13 Dec 2019, 11:15
RE:
PanagiotisCharalampous said:
Hi velu130486,
In order to help you, you will need to share the cBot code with us.
Best Regards,
Panagiotis
Hi Panagiotis,
I download the attached code from Internet, unfortunately I can'y view the source code. I am looking for similar type of code with Risk Management. This code itself working fine, but needs more margin otherwise account get washed out.
Also some time multiple orders are placed at same price in both the directions and I am not able to fix the problem. I am not able to attach that file. please advice
velu130486
20 Nov 2019, 12:50
I request to add this feature of Zooming the Chart like trading view...because the current mode is difficult for drawing the trend lines.
velu130486
02 Jun 2020, 09:18
RE:
Hi Panagiotis,
Thanks for your quick reply, Noted your answer.
Thanks and Regards
R. Vadivelan
PanagiotisCharalampous said: