Topics
Replies
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
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
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