Topics
Replies
hamidrtafx@gmail.com
14 Jun 2018, 11:14
RE:
Panagiotis Charalampous said:
17 bars? If yes, you can use the code I posted
yes bars
but i want In the past, the market has also been featured
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
14 Jun 2018, 10:29
RE:
Panagiotis Charalampous said:
Hi hamidrtafx@gmail.com,
What does -17 represent? Bars, hours, anything else?
Best Regards,
Panagiotis
17From this condition-
if (SenkouSpanA.HasCrossedBelow(SenkouSpanB, 26)
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
14 Jun 2018, 10:26
if (SenkouSpanA.HasCrossedBelow(SenkouSpanB, 26) && switch_komu1) { ChartObjects.DrawVerticalLine(index.ToString(), MarketSeries.OpenTime[index], Colors.Black, 2); ChartObjects.RemoveObject((index - 1).ToString());
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
14 Jun 2018, 10:22
RE:
Panagiotis Charalampous said:
Hi hamidrtafx@gmail.com,
Here it is
hartObjects.DrawVerticalLine("test", MarketSeries.Close.Count - 17, Colors.Red, 2);Best Regards,
Panagiotis
thanks a lot
:but i want market series open time -17 similar code
ChartObjects.DrawVerticalLine(index.ToString(), MarketSeries.OpenTime[index], Colors.Black, 2);
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
12 Jun 2018, 20:36
RE:
Panagiotis Charalampous said:
Hi hamidrtafx@gmail.com,
Try the below
if ((MarketSeries.Open.Last(2) < MarketSeries.Close.Last(1) && MarketSeries.Close.Last(2) > MarketSeries.Close.Last(1)) || (MarketSeries.Open.Last(2) > MarketSeries.Close.Last(1) && MarketSeries.Close.Last(2) < MarketSeries.Close.Last(1))) { // Do something }Best Regards,
Panagiotis
thanks but not true
i want
high.low.close.open) last 1 candel in the body last 2 )
for example picture
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
12 Jun 2018, 14:03
RE:
Panagiotis Charalampous said:
Hi hamidrtafx@gmail.com,
It is not clear what you need the code to do. Please give us more information in order to help you.
Best Regards,
Panagiotis
105/5000
I need to read the code that one candel in the body of the previousl candel , as shown in the above pictures .
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
22 Feb 2018, 15:08
( Updated at: 21 Dec 2023, 09:20 )
RE:
noppanon said:
Hi Hamidrtafx,
You may try to cut and past the code to notepad and save as ANSI text file to clean any encoding.
I modified the code so that you can change how many periods you want to check for flating.
Here is sample if flat periods is 3.
Here is the code.
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class TKFlat : Indicator { [Parameter("Tenkan Sen Period", DefaultValue = 9)] public int TenkanPeriod { get; set; } [Parameter("Kijun Sen Period", DefaultValue = 26)] public int KijunPeriod { get; set; } [Parameter("Senkou Span B Period", DefaultValue = 52)] public int SenkouPeriod { get; set; } [Parameter("Flat Period", DefaultValue = 3)] public int FlatPeriod { get; set; } private IchimokuKinkoHyo Cloud; private Random ChartID; protected override void Initialize() { ChartID = new Random(); Cloud = Indicators.IchimokuKinkoHyo(TenkanPeriod, KijunPeriod, SenkouPeriod); } public override void Calculate(int index) { for (int i = 0; i < FlatPeriod; i++ ) { if (Cloud.TenkanSen[index - i] != Cloud.TenkanSen[index - i - 1]) { return; } } for (int j = 0; j < FlatPeriod; j++) { if (Cloud.KijunSen[index - j] != Cloud.KijunSen[index - j - 1]) { return; } } ChartObjects.DrawVerticalLine("Flat_" + ChartID.Next(0, 100000).ToString(), index, Colors.Aqua, 2, LineStyle.Solid); } } }Happy trading,
Noppanon
thanks a lot.
but i wan any time just dimension flat kijun and tenken are eqaul. not eny flat!!
are you understand?
send me email please.
thanks
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
20 Feb 2018, 19:42
( Updated at: 21 Dec 2023, 09:20 )
for example picture:
i need when for example picture:
tenken &kijun flat equal :
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
20 Feb 2018, 19:10
RE:
noppanonl said:
Hi Hamidrtafx,
You may try quick code. I assume that you already have Ichimoku indicator present in your chart.
using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class TKFlat : Indicator { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } [Parameter("Tenkan Sen Period", DefaultValue = 9)] public int TenkanPeriod { get; set; } [Parameter("Kijun Sen Period", DefaultValue = 26)] public int KijunPeriod { get; set; } [Parameter("Senkou Span B Period", DefaultValue = 52)] public int SenkouPeriod { get; set; } private IchimokuKinkoHyo Cloud; protected override void Initialize() { Cloud = Indicators.IchimokuKinkoHyo(TenkanPeriod, KijunPeriod, SenkouPeriod); } public override void Calculate(int index) { if(Cloud.TenkanSen[index] == Cloud.TenkanSen[index-1] && Cloud.KijunSen[index] == Cloud.KijunSen[index-1]) { ChartObjects.DrawVerticalLine("Flat", index, Colors.Aqua, 1, LineStyle.Solid); } } } }have a good trade
Noppanon
thanks a lot
but have a error:
Error : Error occured during parsing project file: 'System does not support 'ut-kf-8' encoding. Line 1, position 31.'
why?
@hamidrtafx@gmail.com
hamidrtafx@gmail.com
27 Jun 2018, 20:03
@hamidrtafx@gmail.com