Information

Username: amosmsiwa
Member since: 30 Mar 2017
Last login: 15 Aug 2024
Status: Active

Activity

Where Created Comments
Algorithms 0 4
Forum Topics 2 1
Jobs 0 0

Last Algorithm Comments

AM
amosmsiwa · 7 years ago

Great coding, but how about keeping the entry and exit positions simple

i.e.  

public override void Calculate(int index)
        {
            if(MacdHistogram.Histogram.IsFalling()) 
            {
                HistogramNegative[index] = MacdHistogram.Histogram[index];
            }
            
            if (MacdHistogram.Histogram.IsRising())
            {
                HistogramPositive[index] = MacdHistogram.Histogram[index];
            }

// comment : instead of
            //if (MacdHistogram.Histogram[index] > 0)
            //{
            //    HistogramPositive[index] = MacdHistogram.Histogram[index];
            //}

            //if (MacdHistogram.Histogram[index] < 0)
            //{
            //    HistogramNegative[index] = MacdHistogram.Histogram[index];
            //}

            Signal[index] = MacdHistogram.Signal[index];
        }

then use the if (%K > %D)  while macdhistogam isRising() {position.long} else if ( %D>%K)  while macdhistogam isFalling() {position.short} 

AM
amosmsiwa · 7 years ago

Using Select * From * where Alpha>1 and Beta<1

AM
amosmsiwa · 7 years ago

To load data to SSIS and SSAS (SQL Server)

AM
amosmsiwa · 7 years ago

Hi, Mr Hayes, I'm looking to extract closing sample market data for lets say USDGBP on a daily basis to load to excel for quantitative analysis

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class cAlgo4uExcelcBotExample : Robot
    {
        #region excel data objects

        // class name must be same as the excel sheet name. The values must be same as the column names. This is will contain just a single row
        public class DailyTrade
        {
            [ExcelColumn("Friday")]
            public int ID { get; set; }

            [ExcelColumn("Thursday")]
            public DateTime ExpiryDate { get; set; }

            [ExcelColumn("Wednesday")]
            public long Volume { get; set; }

            [ExcelColumn("Tuesday")]
            public string TradeType { get; set; }

            [ExcelColumn("Monday")]
            public double EntryPrice { get; set; }

            
        }

        #endregion