Topics
Replies
derekszyszka
24 Apr 2017, 05:14
Its expired, thats too bad. I wanted to add my PnL percentage code, mixed with my api for automatic account transfers. That way you cant blow up your account on a sudden large movement swing because its constantly taking your profits out.
@derekszyszka
derekszyszka
24 Apr 2017, 05:01
Weird, is your bot somehow disabled now? I am unable to run any back testing in cAlgo, or test this with an addon I build on a demo account.
@derekszyszka
derekszyszka
24 Apr 2017, 02:12
Nice work, love this bot. Can I get a copy of the source code? I know a few minor tweaks I would like to try with the PnL limit.
@derekszyszka
derekszyszka
22 Feb 2017, 16:32
RE:
testpossessed said:
Not sure we have enough information to help you.
What currency pairs is this happening on, different ones, the same ones?
The code is pretty straight forward and I use something similar a lot without this problem.
All currency pairs, could be the gbpusd, usdjpy, audusd, it is comepletely random. Are you willing to share your SL/TP bot you use so I can compare the script?
@derekszyszka
derekszyszka
17 Feb 2017, 16:03
RE:
tradermatrix said:
Hello
I have cut a piece of my bot code
You can choose the direction that wish you to buy or sell.
and even reverse the direction of the losing trades
Thank you very much. Any addition tips or instruction when using this bot? What is your strategy with this algo?
THanks again
@derekszyszka
derekszyszka
17 Feb 2017, 16:03
RE:
tradermatrix said:
Hello
I have cut a piece of my bot code
You can choose the direction that wish you to buy or sell.
and even reverse the direction of the losing trades
Thank you very much. Any addition tips or instruction when using this bot? What is your strategy with this algo?
THanks again
@derekszyszka
derekszyszka
26 Jan 2017, 06:59
RE:
lucian said:
You can try this:
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class derekszyszka : Robot { [Parameter("Source")] public DataSeries Source { get; set; } [Parameter("Periods", DefaultValue = 14)] public int Periods { get; set; } [Parameter("Low RSI", DefaultValue = 28)] public int low_rsi { get; set; } [Parameter("High RSI", DefaultValue = 72)] public int high_rsi { get; set; } private RelativeStrengthIndex rsi; protected override void OnStart() { rsi = Indicators.RelativeStrengthIndex(Source, Periods); } protected override void OnTick() { if (rsi.Result.LastValue <= low_rsi) { foreach (var position in Positions) if (position.TradeType == TradeType.Sell && position.SymbolCode == Symbol.Code) ClosePosition(position); } if (rsi.Result.LastValue >= high_rsi) { foreach (var position in Positions) if (position.TradeType == TradeType.Buy && position.SymbolCode == Symbol.Code) ClosePosition(position); } } } }
This is exactly what I need, thank you very much. Just a thought, would this also be possible with MACD crossover open and closes?
@derekszyszka
derekszyszka
15 Oct 2016, 18:55
Hi there
You should post your cBot code, I would be interested in doing some of my own tests. Thanks!
@derekszyszka
derekszyszka
15 Oct 2016, 18:52
Can you share a copy of this code? I would be interested in doing some of my own tests.
@derekszyszka
derekszyszka
15 Oct 2016, 18:39
Sorry, here is the complete code, have a look
// ------------------------------------------------------------------------------------------------- // // This code is a cAlgo API sample. // // This robot is intended to be used as a sample and does not guarantee any particular outcome or // profit of any kind. Use it at your own risk. // // All changes to this file will be lost on next application start. // If you are going to modify this file please make a copy using the "Duplicate" command. // // The "Sample RSI Range Robot" will create a buy order when the Relative Strength Index indicator crosses the level 30, // and a Sell order when the RSI indicator crosses the level 70. The order is closed be either a Stop Loss, defined in // the "Stop Loss" parameter, or by the opposite RSI crossing signal (buy orders close when RSI crosses the 70 level // and sell orders are closed when RSI crosses the 30 level). // // The robot can generate only one Buy or Sell order at any given time. // // ------------------------------------------------------------------------------------------------- using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class RSIRange20_30 : Robot { [Parameter("Source")] public DataSeries Source { get; set; } [Parameter("Periods", DefaultValue = 6)] public int Periods { get; set; } [Parameter("Stop Loss (pips)", DefaultValue = 10, MinValue = 1)] public int StopLoss { get; set; } [Parameter("Volume", DefaultValue = 10000, MinValue = 1000)] public int Volume { get; set; } private RelativeStrengthIndex rsi; protected override void OnStart() { rsi = Indicators.RelativeStrengthIndex(Source, Periods); } protected override void OnTick() { if (rsi.Result.LastValue > 80) { Open(TradeType.Sell); } else if (rsi.Result.LastValue < 30) { Close(TradeType.Sell); } } private void Close(TradeType tradeType) { foreach (var position in Positions.FindAll("SampleRSI", Symbol, tradeType)) ClosePosition(position); } private void Open(TradeType tradeType) { var position = Positions.Find("SampleRSI", Symbol, tradeType); if (position == null) ExecuteMarketOrder(tradeType, Symbol, Volume, "SampleRSI"); } } }
@derekszyszka
derekszyszka
24 Apr 2017, 16:43
RE: RE: RE: RE:
raphael.mca@hotmail.com said:
I did not get any email. I emailed you directly to trend_meanreversion@yahoo.com
@derekszyszka