Waxy's avatar
Xavier R
¨You are not what you have done, you are what you have overcome.¨ - Anonymous
Xavier R's avatar

Info

Username:Waxy
Name:Xavier R
Member since: 12 May 2015

Favorite symbols:

EURUSD, AUDUSD

About

Telecommunications Engineer, Trader & Programmer. If you want to build a bot or project you can contact me at waxavi@outlook.com.

Signature

¨You are not what you have done, you are what you have overcome.¨ - Anonymous

Last Algorithm Comments

@Self updated Asia/Europe/US Market Hours:  14 Nov 2019, 07:45


Hello, try re-downloading or simply download htmlagilitypack from their website https://html-agility-pack.net/

@Order Cancels Order (OCO):  12 Apr 2019, 22:45


Hello, I've updated it to work with decimals.

@Self updated Asia/Europe/US Market Hours:  11 Dec 2017, 05:20


Hola Axeldos87, Prueba volver a bajar el indicador, obviamente el codigo esta disponible. Si aun no te funciona, simplemente copia el codigo en un nuevo indicador y luego lo compilas.

@Brute Force Breakout Bot (BETA):  11 Dec 2017, 05:06


I've just uploaded this bot after a long time, rebuilt it from scratch, old bugs reported are gone. Made it breakout only, will build another bot for limit orders instead so it's easier for users. I hope it's useful for the CTDN community. Best Regards,

@Tunneling Martingale:  16 Sep 2016, 20:41


This is not a standalone system, it's more of a breakout setup with multiple attemps. To get it working in backtesting, the starting price at the backtesting date must be between the long and short entry parameters, that's how you can make it work for a backtesting, example: Starting price of EURUSD on 1/Jun: 1.1330 Long Entry at: 1.1350 Short Entry at: 1.1310

@Multiple Entries Robot:  19 Jan 2016, 18:48


Hello ThePhantomRaven My fault for not checking this out, didn't know you don't receive email notifications for these posts. I'll check this out and fix it as soon as I can.

@Multiple Entries Robot:  28 May 2015, 17:46


Well let me clarify, Short Star Level Parameter is the entry level for the sell orders. The updated version will work for both limit and stop orders and I'll add an OCO Mode.

@Multiple Entries Robot:  28 May 2015, 15:46


It only works for stop orders, maybe you're placing a short price above current level? I can make it optional to work as limit order as well.

@Multiple Entries Robot:  28 May 2015, 15:40


Hello I've tested the bot and the sell orders are executed according to the rules, please be more specific about the bug? Thank you

Last Forum Posts

@MarketSessions seems to display wrong values:  25 Nov 2022, 19:41


Hello Spotware,

A few details seem off with MarketSessions as I've tested, image provided below

1 - How is that some sessions Start and End at the same time? It doesn't really make sense.
2 - How is that for example Sydney and Tokyo start at the same time? I think Tokyo starts always before, as on some other sites is displayed (pic below).

Code Used:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        protected override void OnStart()
        {
            MarketSessionsChanged += Algo_MarketSessionsChanged;
        }

        private void Algo_MarketSessionsChanged(MarketSessionChangedEventArgs obj)
        {
            Print($"Started {obj.NewSessions}");
            Print($"Ended {obj.PreviousSessions}");
            Print("---");
        }

        protected override void OnTick() { }

        protected override void OnStop() { }
    }
}

Hope this feedback is useful, else please clarify these results

Regards,

@cTrader API question - get bar info from chart object time index:  04 Nov 2022, 08:42


That's different, not sure but something like:
 

var checkPrice = 1.5;
var crossedBar = Bars.Select((bar, index) => (bar, index)).LastOrDefault(x => x.bar.Low <= checkPrice && x.bar.High >= checkPrice);

if (crossedBar.index != 0)
  Print($"Bar Index is {crossedBar.index}");

@cTrader API question - get bar info from chart object time index:  01 Nov 2022, 21:04


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Indicator(AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        private ChartVerticalLine _verticalLine;

        /*
         -- I was wondering if it were possible for me to get the Bars info (eg. OpenPrices, ClosePrices, etc.) from a ChartObject's (such as a vertical line) Time index?           
         -- Any help is appreciated, thanks.
         */

        protected override void Initialize()
        {
            _verticalLine = Chart.DrawVerticalLine("VerticalLine", Bars.OpenTimes.LastValue, Color.Red);

            var index = Bars.OpenTimes.GetIndexByTime(_verticalLine.Time);

            var bar = Bars[index];
            
            Print("Open: {0}, High: {1}, Low: {2}, Close: {3}", bar.Open, bar.High, bar.Low, bar.Close);
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = 
        }
    }
}

@How to debug using Rider/VS Code?:  01 Nov 2022, 20:31


Hello Spotware,

Thanks for your answer, and I may take the opportunity to ask to also give us the option soon to choose whether to open by default in visual studio or these other 2 IDEs, VsCode or Rider.

Thanks for your support,
Regards,

@How to debug using Rider/VS Code?:  01 Nov 2022, 09:53


From the guides I've seen to debug for the new version of cTrader I see we must declare

System.Diagnostics.Debugger.Launch();

However, this only prompts me to select Visual Studio.

Is there a way to debug with these other IDEs and the new cTrader? 

Regards,

@Bug: Default enum value it's not working in cTrader:  31 Oct 2022, 19:47


Hello Panagiotis,

I'm using Spotware 4.4.17, this doesn't work either way with string or enum. but it should work with using enums as before, there shouldn't be a downgrade to this feature, it's just a small bug I believe, that should be fixed asap.

Regards,

@Bug: Default enum value it's not working in cTrader:  31 Oct 2022, 10:16


Hello,

Some of the recents updates to cTrader have broken the ability for the bot to use the default enums when declared, I provide code sample, where even If I set default color to Red, the instance I create sets it to transparent.

Please do fix as soon as possible.
Regards,

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo.Robots
{
    public enum MyColors
    {
        Transparent,
        Black,
        Red,
        Blue,
        Yellow
    }

    [Robot(AccessRights = AccessRights.None)]
    public class EnumTester : Robot
    {
        [Parameter("Color", DefaultValue = MyColors.Red)]
        public MyColors Color { get; set; }

        protected override void OnStart()
        {
            // To learn more about cTrader Automate visit our Help Center:
            // https://help.ctrader.com/ctrader-automate

            Print($"Color is {Color}");
        }

        protected override void OnTick()
        {
            // Handle price updates here
        }

        protected override void OnStop()
        {
            // Handle cBot stop here
        }
    }
}

@Unable to use Print() from within classes:  19 Oct 2022, 23:52


Why can't you use Algo as an argument?

@CT0001 Object reference not set to an instance of an object.:  18 Oct 2022, 04:05


This is quite an issue on 1.0.3, please fix as soon as possible.

Regards,

@What's New in cTrader Desktop 4.4:  13 Oct 2022, 13:05


I'm having some reference issues with WebView and Window

- Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0246    The type or namespace name 'Window' could not be found (are you missing a using directive or an assembly reference?)    WindowSample    C:\Users\USUARIO\Documents\cAlgo\Sources\Indicators\WindowSample\WindowSample\WindowSample.cs    23    Active

- Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0103    The name 'WindowStartupLocation' does not exist in the current context    WindowSample    C:\Users\USUARIO\Documents\cAlgo\Sources\Indicators\WindowSample\WindowSample\WindowSample.cs    73    Active

- Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0246    The type or namespace name 'WebView' could not be found (are you missing a using directive or an assembly reference?)    WebViewOnWindow    C:\Users\USUARIO\Documents\cAlgo\Sources\Indicators\WebViewOnWindow\WebViewOnWindow\WebViewOnWindow.cs    8    Active

- Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0246    The type or namespace name 'WebViewLoadedEventArgs' could not be found (are you missing a using directive or an assembly reference?)    WebViewOnWindow    C:\Users\USUARIO\Documents\cAlgo\Sources\Indicators\WebViewOnWindow\WebViewOnWindow\WebViewOnWindow.cs    41    Active


I'm using latest version of Spotware cTrader, these references should not be missing.
Also, when I build with "Embedded" compiler, these errors are not shown, but it doesn't let me add any instance.

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.
by Waxy
free  13 Feb 2019
UPDATE I've edited this indicator so it can use the new charting API, now you can pick opacity for the boxes. Also fixed a small weekend bug, no charting will be made at that time. This Indicator uses http://forex.timezoneconverter.com/ to retrieve open and close of market times, so you don't need to update it as it will update itself. If you spot a bug, malfunctioning or have a suggestion feel free to contact me: waxavi@outlook.com If you want to code any specific bot or indicator based on this or any other, my services are available on Freelancer:
Average Wick Indicator
  1
  5
  2502
by Waxy
free  11 Feb 2016
I decided to make a simple indicator to see how wicks behave, some cool patterns seem to emerge. You can see for example Upwicks tend to be bigger in downtrends and viceversa.
Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.
Tunneling Martingale
  4
  0
  2848
by Waxy
free  15 Sep 2016
This bot is useful when you don't know direction, but there's a big move on either direction expected. Since it's a tunneling strategy, it's only a martingale if the # of attemps is absurdely high, like 10 or more. Would recommend 4 to 5 attemps at most. Please let me know if there's any bug I'll quickly fix it. Mail: waxavi@outlook.com  
Iceberg bot
  1
  0
  2434
by Waxy
free  29 Jan 2016
DEFINITION of 'Iceberg Order' from Investopedia A large single order that has been divided into smaller lots, usually through the use of an automated program, for the purpose of hiding the actual order quantity. Read more: Iceberg Order Definition | Investopedia http://www.investopedia.com/terms/i/icebergorder.asp#ixzz3yaphczPe  Sometimes a trader wants to place a big order into smaller pieces, this bot makes it possible, using timer it places an orders each number of seconds you can define. Please let me know in case of any bug.
by Waxy
free  28 Jan 2021
Similar to my previous OSO Bot, the OCO Bot handle 2 order, if any of those orders is executed the remaining order will be canceled. Type Buy or Sell and the prices and the Bot will take care if it's limit or stop order by itself. If you find any issue send an email to waxavi@outlook.com -01/27/2020: I have updated this bot to use the latest parameter features
by Waxy
free  28 Jan 2021
This is a Bot that handles OSO Type Orders, it works only for 2 orders, you Type if you wanna Buy or Sell, the prices and the bot will handle the rest. For more info on how OSO Orders work please check Investopedia's page:  http://www.investopedia.com/university/intro-to-order-types/conditional-orders.asp 08/06/?? - Fixed Bug where Order would send before time 01/27/2021 - Updated settings to use the latest parameter features ---- Made by Waxy
by Waxy
free  11 Dec 2017
This bot is useful in breakouts, handling fake breakouts and reducing risk exposure.   Instead of risking 100 pips to make 100 pips, its better to risk 10 pips 10 times if you know the price is going to move significantly away from your entry, for example the break change of a trading session or a technical breakout. Characteristics It can handle both long and short and it displays the number of tries and total profit from all trades. Can work on a single side (only buy/sell on breakout) Can work as an OCO, this means whichever side triggers first will remain until there's profit or the numbers or meets the number of attemps, example: Buy Stop Executed, so the sell stop will be closed and the bot will work with buy orders only. Without an OCO, the sell stop order would remain, and the bot will stop until there's a profit or meets the number of attemps. Can work with multiple instances simultaneously. Can work as a martingale with parameter ("Increment Volume each # of times") example: Parameter is 3, so bot will double position size each time it has 3 losses in a row. Parameter is 1, bot will double position size after each loss. This feature can be disabled. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Tips on how to use it This is not a standalone system, it's only a bot to increase your opportunities and potential profit in definite market conditions. Use a small stop loss. Know the breakout range according to your technical perspective. This is a bot for when market changes from choppy to trending. Set a realistic TP and number of attemps. Be careful since this is a martingale Breakouts or volatile scenarios may cause slippage, wide spreads, nothing can be done about it, include it in yorur trading plan. Safe stops in case settings are not correct Stop losses must not be greater than the width of the breakout band, if there's only one direction (long or short) on your settings, this won't matter. Ask price must be smaller than your long entry price. Bid price must be bigger than your short entry price. If there's an error while placing an order, the bot will stop and display such error on the log. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- I've decided to rebuild the bot from the ground up. Removed limit orders since this is mainly a breakout bot, last version was flawed in that aspect and confusing for users, will create another bot apart for limit orders. In case there's a bug, error or suggestion, please write to: waxavi@outlook.com If you want a custom bot made from this or any other type of strategy/indicator, my services are available on freelancer. (Bot may have bugs - please report if some bug is found) USE THIS BOT AT YOUR OWN RISK AND USE ONLY WITH REAL MONEY IF YOU FULLY UNDERSTAND IT