
meneto

Info
Username: | meeting.chegini |
Name: | meneto |
Member since: | 16 Jan 2022 |
About
Signature
Last Algorithm Comments
@Close on Time: 31 Jul 2022, 16:36
why with .net 6 An error occurs?
Last Forum Posts
@Connection very unstable: 26 Jan 2023, 13:40
Hi,The connection is still unstable and keeps disconnecting and reconnecting. This happens 100 times a day.
In our country, the speed of the Internet has been greatly reduced for some time. However, Metatrader has no connection problems.
How can this problem be solved?
@mark the start of each month on the chart: 03 Aug 2022, 08:06
paolo.panicali said:
// Month Separator by ppanicali2022//last 12 month separator
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
using System.Globalization;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.CentralEuropeanStandardTime, AccessRights = AccessRights.None)]
public class MonthSeparator : Indicator
{
public override void Calculate(int index)
{
if (Bars.OpenTimes[index - 1].Month == Bars.OpenTimes[index].AddMonths(-1).Month && Bars.OpenTimes[index - 1] >= DateTime.Now.AddYears(-1))
{
Chart.DrawVerticalLine("MonthStart" + index, index, Color.Red);
Chart.DrawText("MonthName" + index, DateTimeFormatInfo.CurrentInfo.GetAbbreviatedMonthName(Bars.OpenTimes[index].Month), index, Bars.ClosePrices[index], Color.Green);
}
}
}
}
Thank you
Your code works fine
I myself came to the answer in a different way
Bars bars_D1 = MarketData.GetBars(TimeFrame.Daily, Symbol.Name);
Color color = "#24FE00FD";
for (int i = 0; i < 200; i++)
{
if (bars_D1.Last(i).OpenTime.Month != bars_D1.Last(i+1).OpenTime.Month)
{
rect = Chart.DrawRectangle("Candle_D1" + bars_D1.Last(i).OpenTime, bars_D1.Last(i).OpenTime, bars_D1.Last(i).High, bars_D1.Last(0).OpenTime, bars_D1.Last(i).Low, color);
rect.Comment = "Candle_D1";
rect.IsInteractive = true;
rect.IsFilled = true;
}
}
@how can open setting window of a indicator with code: 02 Aug 2022, 20:18
how can open setting window of a indicator with code
For example, by clicking on a button, the indicator settings window will open
@mark the start of each month on the chart: 02 Aug 2022, 20:13
I need a code to mark the start of each month on the chart
Markings should be applied for the last twelve months
please guide me
@Please roll back the update!!!: 29 Jul 2022, 13:53
The speed of the editor has slowed down and it has made writing code difficult
The shortcut key to delete a line has been removed!!! (Ctrl + D) Why?
In general, coding was much easier in the previous version
@how can use this code SettingsWindow.IsOpened(): 28 Jul 2022, 13:59
how can use this code?
if(SettingsWindow.IsOpened())
SettingsWindow.Close();
I tried to use this code but I got an error:
does not exist in the current context...
@how to add/remove indicators on chart with cbot: 04 Apr 2022, 09:03
amusleh said:
Hi,
You can't add/remove indicators on a chart with a cBot.
Thank you
Will these restrictions be lifted in the future? Because The answer to many of your users' questions is "you can not"!!!
Do not you want to expand the programming capabilities of this platform ??
@[Instruction] Telegram notifications: 14 Mar 2022, 23:46
amusleh said:
meeting.chegini said:
I want to send messages to a telegram channel
How can I do this?
ThanksHi,
You have to add the Telegram bot as an admin on your channel and then you will be able to get a chat ID with it that you can use it to send messages.
Here is a tutorial: Telegram · afhacker/ctrader-alert_popup Wiki (github.com)
Thank you
I also noticed that i can write channel name instead of the chat ID
@[Instruction] Telegram notifications: 14 Mar 2022, 05:16
I want to send messages to a telegram channel
How can I do this?
Thanks
@How to set a custom parameter: 05 Mar 2022, 01:22
like this
public enum CustomType
{
Low,
Medium,
High
}
[Parameter("P1", Group = "new type", DefaultValue = Low)]
public CustomType P1 { get; set; }
read this like for more information:https://w3schools.com/cs/cs_enums.php