cysecsbin.01

Info
Username: | cysecsbin.01 |
Name: | cysecsbin.01 |
Member since: | 10 Nov 2018 |
About
Signature
Last Algorithm Comments
@Intraday POI: 14 Mar 2020, 20:07
Very nice work
@BTMM Template: 21 Feb 2020, 10:58
the code has been updated to work on machines with a non-standard datetime format
@Auto Drawings: 30 Oct 2019, 00:32
You're a genius, thanks
@TimeframeSync: 26 Aug 2019, 21:00
Beautiful work and breathtaking code
@Pivot-GURU (Daily-Weekly-Monthly Pivots): 21 Aug 2019, 21:09
Nobody does, the guy is a plain blind reposter, he doesn't even know he's reposting links to sites and not indis
@QQE: 21 Aug 2019, 21:07
guess what? another repost from the guy. Do not give credit, this indicator was stolen from daemon as you can see here https://ctrader.com/algos/indicators/show/169
@harmonic 1.: 21 Aug 2019, 21:05
This isn't even an indicator, you just copied an advertise from scyware https://ctrader.com/algos/indicators/show/1599
@feactals: 21 Aug 2019, 21:02
Yet another repost, why are you even making these? Do not give any credit to this guy, he's just plainly copying and reposting other's work. It's a shame spotware just ignores these users who are just damaging the community by making useless posts and by polluting the algo section. This is spka111's work, you can find it here https://ctrader.com/algos/indicators/show/142
@I need Help to make a robot please: 01 Aug 2019, 19:07
Hi, you should not post jobs here, this place is for completed indicators and bots. instead, post it in the jobs section here https://ctrader.com/jobs/
@custom volume profile: 01 Aug 2019, 19:05
so... you just copoied my code? I believe users can find my volume profile even without any kind of advertising
Last Forum Posts
@Possible LoadMoreHistory bug: 09 Apr 2020, 19:53
Hi, thanks for the reply.
i missed to tell you that first and second source parameters are to be filled in with two assets name, like "GBPUSD" and "XAUUSD", the functioning version of the indicator, with the parameters set as said and with the LoadMoreHistory commented out will display like this
Thanks in advance for any help
@Possible LoadMoreHistory bug: 09 Apr 2020, 11:21
Dear Spotware,
I built a covariance indicator some time ago, it all worked fine but now it looks like it is not working anymore, and i haven't changed the code since i made it, so i was wondering what was going on.
The indicator does not seem to display any output, instead, once put on chart, it goes on loading and loading forever without ever stopping, this is show in the pic below, where the chart cursor has become very small from all the bars loaded:
This is odd, since the indicator calls LoadMoreHistory() in Initialize just once, and not in a continuous, infinite loop.
Here is source code for the indicator:
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Levels(0, 0.2, -0.2, 1, -1, 0.8, -0.8)]
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class Covariance : Indicator
{
[Parameter("Slow Period", DefaultValue = 120)]
public int Period { get; set; }
[Parameter("Fast Period", DefaultValue = 50)]
public int FastPeriod { get; set; }
[Parameter()]
public string FirstSource { get; set; }
[Parameter()]
public string SecondSource { get; set; }
[Parameter()]
public bool DisplayCorrelation { get; set; }
[Output("Fast", LineColor = "Cyan")]
public IndicatorDataSeries Fast { get; set; }
[Output("Slow", LineColor = "Orange")]
public IndicatorDataSeries Slow { get; set; }
private Bars FirstSeries, SecondSeries;
protected override void Initialize()
{
FirstSource = FirstSource == "" ? Symbol.Name : FirstSource;
SecondSource = SecondSource == "" ? Symbol.Name : SecondSource;
FirstSeries = MarketData.GetBars(TimeFrame, FirstSource);
SecondSeries = MarketData.GetBars(TimeFrame, SecondSource);
FirstSeries.LoadMoreHistory();
SecondSeries.LoadMoreHistory();
IndicatorArea.DrawHorizontalLine("0.8", 0.8, Color.Green);
IndicatorArea.DrawHorizontalLine("-0.8", -0.8, Color.DarkRed);
}
public override void Calculate(int index)
{
Fast[index] = ResultAt(index, FastPeriod);
Slow[index] = ResultAt(index, Period);
}
public double ResultAt(int index, int period)
{
int index1 = FirstSeries.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
int index2 = SecondSeries.OpenTimes.GetIndexByTime(Bars.OpenTimes[index]);
double result;
///Expected values for X and Y
double firstMean = 0, secondMean = 0;
for (int i = 0; i < period; ++i)
{
firstMean += FirstSeries.ClosePrices[index1 - i];
secondMean += SecondSeries.ClosePrices[index2 - i];
}
firstMean /= period;
secondMean /= period;
///Expected value for (X - E[X])(Y - E[Y])
double productMean = 0;
for (int i = 0; i < period; ++i)
{
productMean += (FirstSeries.ClosePrices[index1 - i] - firstMean) * (SecondSeries.ClosePrices[index2 - i] - secondMean);
}
productMean /= period;
///Display covariance
result = productMean;
if (DisplayCorrelation)
{
double firstStd = 0, secondStd = 0;
for (int i = 0; i < period; ++i)
{
firstStd += Math.Pow(FirstSeries.ClosePrices[index1 - i] - firstMean, 2);
secondStd += Math.Pow(SecondSeries.ClosePrices[index2 - i] - secondMean, 2);
}
firstStd = Math.Sqrt(firstStd * 1 / (period));
secondStd = Math.Sqrt(secondStd * 1 / (period));
result = productMean / (firstStd * secondStd);
}
return result;
}
}
}
@ChartObjects as Outputs: 05 Feb 2020, 00:16
Hi everyone, i would like to ask if it's possible to set certain ChartObjects, like trendlines, as outputs.
I've recently seen an indicator which was able to change color to trendlines and make them visible/invisible by changing the settings from the "Modify Indicator" form, by acting as if it was an indicatordataseries regular output. The indicator was, sadly, not open source. I would like to ask how is it possible to obtain said behauvoir.
Many thanks to everyone
-C
@Unknow error: 06 Jan 2020, 11:17
ClickAlgo said:
Hi, C,
You just need to debug with visual studio and step through the code, you will find where the problem is easy enough. Even though cTrader has a single UI thread you should be able to use parallel programming to accomplish the task of calling the API concurrently to get the data you need, but there may be limitations with the architecture being used that could be causing your problem.
It may also be an idea to use the performance profiler to see how long the tasks are running and how much memory it is using.
You could create a simple test-harness to make 10 calls to the API for the marketseries data, good luck with resolving this :-)
Hi Paul, thanks for your help, i will proceed to implement your idea and monitor the thread one by one during excecution.
Have a nice day and a happy new year
-C
@Unknow error: 30 Dec 2019, 19:40
PanagiotisCharalampous said:
Hi cysecsbin.01,
Can you provide us with more information to reproduce this problem i.e. cBot code, backtesting parameters and broker?
Best Regards,
Panagiotis
Good evening,
I should try to replicate the error with a different code than that i'm using now since it is part of a private project, i will try to do it in the following days.
Anyway, i have to start a managed portfolio soon, and it is quite imperative for me and my clients to do so. isn't it possible to get a general description of the error so that i can have an idea of what it is about? i know ctrader's api's methods are not thread-safe, could it be related to some kind of concurrent access problem? The bot that is causing the error loads up to 10 marketseries at a time, could it be related to the data's quantity?
Any help would be appreciated
-C
@Unknow error: 24 Dec 2019, 11:57
I recently had this error:
24/12/2019 10:53:50.951 | cBot crashed: Error #16302763
What kind of error is this? is it possible to have a description?
@Missing feature in compiler: 24 Dec 2019, 10:43
cTrader does not recognize the "ignore" character "_" when compiling.
This is not an advanced feature, it is just a basic c#7 feature and in my opinion should be added.
this can be noted by using a ConcurrentDictionary.TryRemove(string key, out _); as referenced by
@Bot Events: 01 Dec 2019, 11:46
My suggestion is to render public the bot events OnTick, OnBar, OnTimer, OnPositionOpened, OnPositionClosed etc... So that they can be attached to external classes with ease.
Take for instance a windows form that is used to monitor a bot on a chart, then it would be much easier to attach a Bot.Tick += FormUpdate; inside the form then calling the update from inside the bot in the OnTick method, which makes it cluttered.
-C
@Multiple Profiles Question: 29 Oct 2019, 21:00
Dear spotware, since the last release i noticed you have added the possibility of having cTrader in a "multiple profiles" mode, my question is though: what kind of advantages does this feature bring?
I'm asking since it is not clear, in the "What's new" section in the desktop platform it says that multiple instances with their own settings file will be avaiable, but what excactly are these settings? are they the cTrader ID? Language? Default Lots? Theme Color? I would like a clarification.
Then, is it possible to set instances with their own cTrader ID? like 3 desktop shortcuts, each one logged on a specific cTID?
Best regards
-C
@unhandled exception with some brokers: 15 Oct 2019, 14:25
Hi, i published just yesterday an indicator named ReaPivot, it works pretty well on all forex pairs but when loading it on indices like Euro50, UK100 and some others ctrader will prompt an error message and will ask to be restarted. The indicator will not start and draw anything on chart after this error.
The indicator is this one https://ctrader.com/algos/indicators/show/2021
The code does not present compile-time errors nor runtime exceptions as can be seen here:
I am kindly asking for assistance on this very issue since i cannot understand what the error is.
This is FXPro's cTrader platform
Thanks in advance
-C