Topics
12 Jun 2019, 02:36
 1328
 3
20 May 2019, 04:59
 1062
 3
20 Mar 2019, 14:30
 1277
 2
06 Feb 2019, 02:37
 1725
 4
12 Jul 2018, 16:19
 1378
 3
19 Jun 2018, 14:05
 2033
 4
18 Jun 2018, 11:21
 1423
 4
06 Jun 2018, 00:51
 1431
 5
Replies

zedodia
19 Jun 2018, 14:00

Thank you for the clarification. Is there any benefit or pro vs con of running in automate vs trade? Or is it just two options for the same outcome?


@zedodia

zedodia
06 Jun 2018, 14:17

Ah ok. Thanks for the quick reply mate. Hope it’s comes soon. I’m sure many people are interested to see it implemented. 

I did a bit of a search on the site. It seems there is no way to add it in a code easily?


@zedodia

zedodia
06 Jun 2018, 04:38

It’s as I expected. The equity drawdown isn’t the drama when backtesting. It’s the available margin which allows you to open more positions. Is there a way to add this into testing or do I need to find a different backtesting software. 

 

I’ll try post some pic tonight to aid in what I’m trying to explain if it’s not making sense.


@zedodia

zedodia
05 Jun 2018, 06:07

I’ll say the same thing. It now works. Last night I was able to backtest the same bots and it ran the whole process without stopping. I can not replicate the fault anynore


@zedodia

zedodia
03 Jun 2018, 02:10 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

patrick.sifneos@gmail.com said:

This is a prototype of scalping Bot.

Rules:

  • Timeframe: 1 Minute. May also work on 5 minutes 
  • Stochastic K% < 20 and Stochastics K% > Stochastics D%
  • Stochsastic K% should rising
  • RSI should rising
  • Close on Stochsatics K% > 80

Play with parameters ans let me know what you think.

 

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.CentralEuropeanStandardTime, AccessRights = AccessRights.None)]


    public class NewcBot : Robot
    {
        private MovingAverage EMA_Fast;
        private MovingAverage EMA_Slow;
        private StochasticOscillator Stochastics;
        private RelativeStrengthIndex RSI;

        protected override void OnStart()
        {
            EMA_Fast = Indicators.ExponentialMovingAverage(MarketSeries.Close, 50);
            EMA_Slow = Indicators.ExponentialMovingAverage(MarketSeries.Close, 100);
            Stochastics = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Exponential);
            RSI = Indicators.RelativeStrengthIndex(MarketSeries.Close, 14);
        }

        protected override void OnTick()
        {
            if ((Server.Time.Hour > 17) && (Server.Time.Hour < 22))
                return;

            if ((NoOrders()) && (RSI.Result.IsRising()) && (EMA_Fast.Result.LastValue > EMA_Slow.Result.LastValue) && (EMA_Fast.Result.IsRising()) && (Stochastics.PercentK.IsRising()) && (Stochastics.PercentK.LastValue < 20) && (Stochastics.PercentK.LastValue > Stochastics.PercentD.LastValue))
            {
                ExecuteMarketOrder(TradeType.Buy, Symbol, 100000, "Stochastics Scalping", 10, 12);
            }

            if ((Stochastics.PercentK.LastValue > 80))
            {
                foreach (Position pos in Positions)
                {
                    if (pos.SymbolCode == Symbol.Code)
                        ClosePosition(pos);
                }
            }
        }

        protected override void OnStop()
        {
            // Put your deinitialization logic here
        }

        bool NoOrders()
        {
            foreach (Position pos in Positions)
            {
                if (pos.SymbolCode == Symbol.Code)
                    return false;
            }

            foreach (PendingOrder po in PendingOrders)
            {
                if (po.SymbolCode == Symbol.Code)
                    return false;
            }

            return true;
        }
    }
}

 

Drummond360 said:

If you liked those results check out this little weapon!

 

 

Is this for real? I copied that code posted and had a play with parameters but i cant get it to trade very often at all. let alone to great profit. Any chance you can share a range at all?


@zedodia

zedodia
03 Jun 2018, 02:07

thanks for the reply. I wont post the code as it is not my own and dont want to distribute something i didnt write. I will keep learning .


@zedodia