Replies

matttt
24 Sep 2012, 16:14

I'm on something else at the moment, but part of the solution may be in the new release of the soft with the command :

Notifications.SendEmail(string from, string to, string subject, string text): Introduced a new method which sends a notification email message from Robots and Indicators. You can change the settings of emails from Email Settings menu item under preferences in both cTrader and cAlgo.

I'll get back when I will have had the time to tackle this point.And if only I manage to make it work indeed ;)


@matttt

matttt
24 Sep 2012, 16:11

Reference custom indicator

Hi PsykotropyK,

Thanks for the tips and the reply...

It appears that the issue was, as you suggested, that the class declared at the beginning in the indicator was "NewIndicator" instead of AroonHorn called in the robot. First thing solved !!

 

I also made the following changes which seem to be good advice : ''change your reference to your indicator by //#reference: ..\Indicators\AroonHorn.algo''...

 

 

Another mistake is appearing now but I'll of course check if I can solve it myself first before asking for help.

Thanks again PsykotropyK,

 


@matttt

matttt
21 Sep 2012, 11:21

To PsykotropyK or the support team,

 

Can you clarify your solution given in your last post ?

I do have the same issue with calling an indicator which works on the plateforme (the indicator is Aroon Horn and was downloaded from this forum).

It still gives the same error message when building the code : "The type or namespace name 'AroonHorn' could not be found are you using directive or an assembly reference?)"

I checked the spelling, it was correct. I even tried renaming the indicator (new file to keep the old one OK) without space and it still return the same error message when building the bot.

 

Beginning of the code is copied hereunder if someone could help (yet this part which is the one causing troubles) :

 


//#reference: C:\Documents and Settings\Mat\Mes documents\cAlgo\Sources\Indicators\AroonHorn.algo
// -------------------------------------------------------------------------------------------------
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo.Robots
{
    [Robot]
    public class ISSUEALONE : Robot 
    { 
        [Parameter ("Period", DefaultValue = 10)]
        public int Period { get; set; }
        
        [Parameter("Filter", DefaultValue = 25)]
        public int Filter { get; set; }

        [Parameter("Stop Loss (pips)", DefaultValue = 10)]
        public int StopLoss { get; set; }

        [Parameter("Volume", DefaultValue = 10000, MinValue = 0)]
        public int Volume { get; set; }

        private Position position;        
        private AroonHorn ARH;

        protected override void OnStart()
        {
            ARH = Indicators.GetIndicator<AroonHorn>(Period, Filter);
        }

        protected override void OnBar()
        {
            if (Trade.IsExecuting) return;

 

 

and then follow the rest of the code with decision parameters... etc...

Thanks in advance for your help.


@matttt

matttt
21 Sep 2012, 09:40

Email notifications when indicator has passed a chosen threshold

To clarify (sorry) :> Indicator should actually CROSS chosen level for the email to be sent.

i.e on H1 period with the MACD :
if MACD < 0 at 9AM
[...] and MACD > 0 at 10AM
[...] then the email is immediatly sent at 11.00AM
[...] and if it stays above 0 it doesn't send an email until it goes below 0 level.


@matttt