Luke
    Luke 's avatar

    Info

    Username:lukasz.iskier
    Name:Luke
    Member since: 25 Dec 2019

    About

    None

    Signature

    None

    Last comments

    @Cycle Identifier AL: Dear @moza11, I have a problem with this indicator. I wrote post in forum: https://ctrader.com/forum/cbot-support/22712?page=1#1 I would like to get history data that I see on chart with Custom Indicator. OnStart method I would like to get last values from this Indicator. I don't understand why the data that I print in logs are not the same as I see on the chart. As an example I am looking for all Major Sell or Buy signals. The logs from below code shows different values compared to values seen on chart. What is more if I loop over all results, there are not possible data as sometimes DotsBuy and DotsSell are at the same time with value = 1. The dots are either Buy or Sell. The endgame is to have opportunity to create a logic in cBot that after restart the cBot it can get the last Major signal (either it is sell or buy) based on history data from chart. Please see below code. 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 aTestIndi : Robot     {         private CycleIdentifierAL cycle;           protected override void OnStart()         {             cycle = Indicators.GetIndicator<CycleIdentifierAL>(0, 0, 12, MovingAverageType.Simple, 21, 3, 1, 4);               for (int i = 0; i < 100; i++)             {                 if (cycle.MajorSell.Last(i) == 1 || cycle.MajorBuy.Last(i) == -1)                 {                     Print(i);                     Print("Date: " + MarketSeries.OpenTime.Last(i));                     Print("cycle.Line.Last(" + i + "): " + cycle.Line.Last(i));                     Print("cycle.MajorBuy.Last(" + i + "): " + cycle.MajorBuy.Last(i));                     Print("cycle.MajorSell.Last(" + i + "): " + cycle.MajorSell.Last(i));                     Print("cycle.MinorBuy.Last(" + i + "): " + cycle.MinorBuy.Last(i));                     Print("cycle.MinorSell.Last(" + i + "): " + cycle.MinorSell.Last(i));                     Print("cycle.DotsBuy.Last(" + i + "): " + cycle.DotsBuy.Last(i));                     Print("cycle.DotsSell.Last(" + i + "): " + cycle.DotsSell.Last(i));                 }             }         }     } }
    Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

    No uploaded.

    Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

    No uploaded.