Topics
Replies
deanmikan@gmail.com
29 Jul 2018, 04:33
Beautiful
Thank you so much devs!!!! This is the best update in a LONG time. I've been manually drawing rectangles for too long... And the visual mode looks and feels great.
Whilst I might have your attention, I would like to point out a massive bug in the backtest feature:
The ModifyPosition method is bugged in the fact that if you modify the volume to be less than that of the current position, it calculates the profit incorrectly.
An example would be this code:
protected override void OnBar() { if (Positions.Count == 0) { ExecuteMarketOrder(TradeType.Sell, Symbol, Symbol.NormalizeVolumeInUnits(Account.Balance*5), "temp", 50, 50); } else { if (Positions[0].NetProfit > 5) ModifyPosition(Positions[0], Symbol.NormalizeVolumeInUnits(Positions[0].VolumeInUnits - 1000)); } }
This will give you a profit in the billions of % due to it calculating every profit when modified as the original volume, despite only taking 1000 units in volume. Test on EURUSD for example.
Also it would be awesome if in future updates the devs could work on making the backtest feature less hell to use. When making over 2000 or 3000 trades the lag I experience, even ona a good computer, is atleast 20-30 wait times till I can even use the software without it not responding. And i'm quite sure there are many memory leaks in the software as using it for a long period of time it gets slower and slower.
Cheers Devs!
@deanmikan@gmail.com
deanmikan@gmail.com
04 Jun 2018, 03:45
( Updated at: 21 Dec 2023, 09:20 )
RE: RE: RE:
zedodia said:
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?
Of course this is not real... Think logically.
@deanmikan@gmail.com
deanmikan@gmail.com
16 Dec 2018, 07:31
You could create your own API that triggers requests to your favourite communications service provider (CSP) to send texts to your phone/smart watch.
@deanmikan@gmail.com