Replies

apexji
26 Mar 2016, 00:52

RE: Again would like to ask a question

cyfer said:Again would like to ask a question, the info list, if spread < 2 font color to yellow, then, how to write?   I am a rookie.Master, can you do me a favor?

Save yourself the headache and do this 

 

using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AutoRescale = true)]
    public class MultiSymbolMarketInfo : Indicator
    {
        private Symbol symbol1;
        private Symbol symbol2;
        private Symbol symbol3;
        private Symbol symbol4;
        private Symbol symbol5;
        private Symbol symbol6;
        private Symbol symbol7;

        [Parameter(DefaultValue = "EURGBP")]
        public string Symbol1 { get; set; }

        [Parameter(DefaultValue = "GBPUSD")]
        public string Symbol2 { get; set; }

        [Parameter(DefaultValue = "EURUSD")]
        public string Symbol3 { get; set; }

        [Parameter(DefaultValue = "EURJPY")]
        public string Symbol4 { get; set; }

        [Parameter(DefaultValue = "AUDJPY")]
        public string Symbol5 { get; set; }

        [Parameter(DefaultValue = "EURCAD")]
        public string Symbol6 { get; set; }

        [Parameter(DefaultValue = "GBPJPY")]
        public string Symbol7 { get; set; }

        protected override void Initialize()
        {
            symbol1 = MarketData.GetSymbol(Symbol1);
            symbol2 = MarketData.GetSymbol(Symbol2);
            symbol3 = MarketData.GetSymbol(Symbol3);
            symbol4 = MarketData.GetSymbol(Symbol4);
            symbol5 = MarketData.GetSymbol(Symbol5);
            symbol6 = MarketData.GetSymbol(Symbol6);
            symbol7 = MarketData.GetSymbol(Symbol7);
        }

        public override void Calculate(int index)
        {
            if (!IsLastBar)
                return;


            var text = FormatSymbol(symbol1) + "\n" + FormatSymbol(symbol2) + "\n" + FormatSymbol(symbol3) + "\n" + FormatSymbol(symbol4) + "\n" + FormatSymbol(symbol5) + "\n" + FormatSymbol(symbol6) + "\n" + FormatSymbol(symbol7);
            ChartObjects.RemoveObject(text);
            ChartObjects.DrawText("symbol1", text, StaticPosition.TopLeft, Colors.Lime);
        }

        private string FormatSymbol(Symbol symbol)
        {
            var spread = Math.Round(symbol.Spread / symbol.PipSize, 1);
            if (symbol.Code.Contains("JPY"))
            {
                return string.Format("{0}\t\t Ask: {1}\t Bid: {2}\t Spread: {3}", symbol.Code, symbol.Ask, symbol.Bid, spread);
            }
            else
                return string.Format("{0}\t Ask: {1}\t Bid: {2}\t Spread: {3}", symbol.Code, symbol.Ask, symbol.Bid, spread);

        }
    }
}

*I have nothing to say about your browser issue , I'm using Opera browser 

 

 


@apexji

apexji
26 Mar 2016, 00:44

Thank you very much enthusiastic friends to help

Thank you very much enthusiastic friends to help


@apexji

apexji
25 Mar 2016, 07:42

RE: 22222
mikepecson72 said:

Dear Spotware,

 

I have been struggling to make the send email notification worked for yahoo. I have double checked everything on my part but it still I cannot send an email from my indicator.

Notifications.SendEmail("info@mysite.com", "myreciepent@yahoo.com", "test subject", "this is the message");
12/02/2016 15:28:57.394 | Failed to send email "test subject". System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html    at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result)    at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)

12/02/2016 15:29:10.623 | Failed to send email "test subject". Timeout

above are my code and errors for your perusal.

I have checked everything from this page and make sure I followed the settings for Yahoo but still Im having issues.

http://help.spotware.com/calgo/cbots/email-notifications#settings

https://help.yahoo.com/kb/SLN4724.html

please help me what settings is need so I can send email using the Yahoo settings.

thanks in advance for your help.

 



@apexji

apexji
25 Mar 2016, 07:37 ( Updated at: 29 Mar 2016, 12:56 )

This post was removed by moderator because it duplicates another post. /forum/indicator-support/8706?page=1#6


@apexji