Topics
30 Aug 2024, 11:09
 0
 338
 0
15 Aug 2024, 13:12
 0
 336
 0
23 Jul 2024, 17:30
 0
 418
 0
02 Jun 2024, 00:49
 2
 586
 3
14 Apr 2024, 00:05
 596
 4
15 Jan 2024, 06:08
 680
 3
Replies

Waxy
31 May 2018, 01:50

Hello Patrik,

I must repeatedly do this in order to work, hopefully, there will be a fix for backward compatibility soon, right?

Best Regards


@Waxy

Waxy
14 May 2018, 05:59

Hello Panagiotis,

Thanks for letting me know about this, hope it gets implemented soon.

Best Regards,


@Waxy

Waxy
10 May 2018, 18:56

Hello Panagiotis,

I've done a lot of codes for other traders and I do think a couple features would be nice to have, I think Spotware team has their hands busy and are missing some small details.

  • For example, it would be nice to have more flexible parameter types i.e.:
    • Datetime, so the user doesn't have to input a date as a string leading to errors, of course, I can check if the date is being parsed correctly, but the issue here is that it's not practical for the end user.
    • Enum types:
      • Instead of setting parameters like these: "Long = true / Short = false" or type a string "Long/long/Buy/buy" for long and "Sell//sell/Short/short" for short, including just the TradeType as an actual parameter would solve this.
      • Some users also ask for custom types, i.e: "Low Risk/Medium Risk/High Risk" or "Trade Limit Only/Trade Market Only" these type of enum parameters are available on other platforms like MT4 and it would be really useful to have them.
  • Another important feature would be buttons included on the API, I can already do this with Windows Forms, but it would be nice to have a quick feature so the buttons would be included inside the charts.
  • Also, it would be nice to have the objects used drawn on backtesting, sometimes lines and objects are part of the systems and not having them makes it hard to backtest/debug, again this feature is implemented on MT4 already.
  • Same day tick optimization.
  • Step by Step backtesting.

I think some if not all of these features are very important, especially the objects on backtesting and parameter types, would be nice if you could help me push some of these features to be implemented anytime soon.

Xavier R.


@Waxy

Waxy
01 Apr 2017, 04:10

Hello .tmc, thanks for your response

The file is not opened by any other app, and I set the days as you told me, still play button is gray. I'm pretty clueless about this issue.

Does the file has to be on any specific location?

Best Regards,

 


@Waxy

Waxy
20 Mar 2017, 04:30

Thank you Lucian, 

I drop this in case someone else needs it,

        string[] _Codes = new string[] 
        {
            "EURUSD",
            "GBPUSD",
            "EURJPY",
            "USDJPY",
            "AUDUSD",
            "USDCHF",
            "GBPJPY",
            "USDCAD",
            "EURGBP",
            "EURCHF",
            "AUDJPY",
            "NZDUSD",
            "CHFJPY",
            "EURAUD",
            "CADJPY",
            "GBPAUD",
            "EURCAD",
            "AUDCAD",
            "GBPCAD",
            "USDNOK",
            "AUDCHF",
            "USDMXN",
            "GBPNZD",
            "CADCHF",
            "USDSEK",
            "GBPCHF",
            "EURRUB",
            "USDRUB",
            "USDCHN",
            "EURSEK",
            "GBPZAR",
            "USDTRY",
            "NZDCHF",
            "EURPLN",
            "USDZAR",
            "EURMXN",
            "EURDKK",
            "EURHUF",
            "SGDJPY",
            "EURNOK",
            "EURHKD",
            "GBPNOK",
            "USDHUF",
            "NZDCAD",
            "EURZAR",
            "EURCZK",
            "NZDSGD",
            "USDPLN",
            "EURNZD",
            "AUDNZD",
            "EURTRY",
            "USDDKK",
            "NZDJPY",
            "USDCZK",
            "USDSGD",
            "GBPSGD",
            "GBPSEK",
            "AUDDKK",
            "AUDSGD",
            "AUDZAR",
            "CADMXN",
            "CHFNOK",
            "CHFSGD",
            "CHFZAR",
            "DKKNOK",
            "DKKSEK",
            "EURCNH",
            "EURRON",
            "EURSGD",
            "GBPDKK",
            "GBPTRY",
            "HKDJPY",
            "NOKJPY",
            "NOKSEK",
            "NZDSEK",
            "USDRON",
            "ZARJPY",
            "SEKJPY"
        };

 


@Waxy

Waxy
11 Nov 2016, 18:22

I think this cannot be done for the moment with the current API.


@Waxy

Waxy
28 Jul 2016, 18:09

I think Positions.Find() is not tracking orders correctly because of the comments (I have many orders with the same label but different comments), I'll try to check if this is true.


@Waxy

Waxy
12 Jul 2016, 06:05

look it up with history, you can do:

            foreach (var hist in History)
            {
                if (hist.ClosingPrice == 1)
                {
                    //Do Stuff
                }
            }
            //
            HistoricalTrade _hist = History.FindLast("Label");
            Print(_hist.ClosingPrice);
            //
            HistoricalTrade[] _histlist = History.FindAll("Label");
            Print(_hist.ClosingPrice);

 


@Waxy

Waxy
24 May 2016, 05:49

Thank you galafrin, can't believe I had no idea of this.

So my purpose was to use a function for a range (day) and skip the weekends, I had to find a more reliable source code, tho not efficient it works, anyway I'll post it here.

            DayOfWeek _ref = MarketSeries.OpenTime.LastValue.DayOfWeek;
            int i = 0;
            int _auxday = 1;
            while (_auxday < _DaysToCompute)
            {
                if (MarketSeries.OpenTime.Last(i).DayOfWeek == _ref)
                {
                    i++;
                }
                else
                {
                    _ref = MarketSeries.OpenTime.Last(i).DayOfWeek;
                    UseFunctionForDayBack(_auxday);
                    _auxday++;
                }
            }

 


@Waxy

Waxy
28 Apr 2016, 04:25

I'll give a try to quickfixn!


@Waxy

Waxy
27 Apr 2016, 19:22

I agree with mindbreaker I'm lost with this new feature, please provide some examples.


@Waxy

Waxy
20 Apr 2016, 02:27

RE:

Please let me know if you fix it, I'm curious about why this is happening.


@Waxy

Waxy
19 Apr 2016, 22:25

Hello Spotware

Now it works fine, I thought I had some library missing or something.

Both making new cBots and Indicators is fixed.

Thank you


@Waxy

Waxy
19 Apr 2016, 22:07

So the latest update (today) fixed this for me, what about you .ics?


@Waxy

Waxy
14 Apr 2016, 21:28

Just tested on cBots and it throws the same error.


@Waxy

Waxy
14 Apr 2016, 19:52

As you said: 

MarketSeries EURUSD = MarketData.GetSeries("EURUSD", TimeFrame.Minute);

Then:

double _open = EURUS.Open.Last(_numberofbarsago);

 


@Waxy

Waxy
12 Apr 2016, 00:28

I'm sorry, but you asked for this:

I would like to get the MarketSeries of the current chart timeframe

Also about GetSeries, I think it's not possible to get timeframe tick data.


@Waxy

Waxy
06 Apr 2016, 21:13

Hello fcomanjoncabeza

Even easier, just do:

var _CurrentTF = MarketSeries.TimeFrame;

 


@Waxy

Waxy
01 Apr 2016, 06:09

Use a random label generator function and run it before placing the first trade, here's mine:

        protected string GetLabel(string _TType)
        {
            Random rn = new Random(10);
            int x = rn.Next(100, 10000);
            _Label = _TType + x.ToString();

            var _CLD = History.FindLast(_Label);
            var _CLO = Positions.Find(_Label);
            while (_CLD != null || _CLO != null)
            {
                x++;
                _Label = _TType + x.ToString();
                _CLD = History.FindLast(_Label);
                _CLO = Positions.Find(_Label);
                //Theres a duplicated Label, finding another one
            }
            return _Label;
        }

Then do something like

string Label = GetLabel(Symbol.Code);

 


@Waxy

Waxy
01 Apr 2016, 06:01

This code has some bugs

First: You can't close a position that's already closed, most of your code happens when a position is closed, so you can't ask it to close it again, you could check it throws an error with: "Entity not found"

TradeResult OperationResult = ClosePosition(position);
                    if (!OperationResult.IsSuccessful)
                    {
                        Print("Operation could not be done, error: {0}",OperationResult.Error);
                    }

Second: You don't reset the counter if the last position is profitable, btw if you want to check the losers in a row do this.

            int losercount = 0; //declare it earlier
            foreach (var hist in History)
            {
                if (hist.Label == "Martingale") //within your bot trade history
                {
                    if (hist.NetProfit < 0)
                    {
                        losercount++;
                        if (losercount == 3)
                            Stop();
                    }
                    else
                    {
                        losercount = 0;
                    } 
                }
            }

 


@Waxy