Replies

stevie.c
09 Apr 2016, 10:18

RE:

Great stuff TraderM!

Sounds like you've managed to get to a place where most of us are aiming for. Thanks for sharing your experience and giving us some hope.


@stevie.c

stevie.c
01 Apr 2016, 01:11

RE:

croucrou said:

 Yes, I know I confused it a bit, but anyway, I think there is something wrong with the added part of the code.

Hi croucrou - you were correct. Some of my constant defaults were in error. Thanks for taking the time to help me focus.


@stevie.c

stevie.c
01 Apr 2016, 01:09

RE: RE: RE:

Hi Ironmine. Thanks for the comments. Given the small number of people coming forward for this survey, I am tempted to believe you..!

Many thanks to everyone(!) who responded...


@stevie.c

stevie.c
30 Mar 2016, 20:38

RE:

Thanks for the reply croucrou.

The code is as per the sample trend /algos/cbots/show/8, but with a third MA added, so I don't think it would be the "if" condition, particularly as the value being shown in the log seemingly has no relationship to the chart..?

 


@stevie.c

stevie.c
24 Mar 2016, 02:41

RE:

Thanks TMC. The randomness when the last closed position ended up in profit just didn't seem random enough during backtesting. Perhaps it is an artefact of this type of trading strategy.

Cheers.


@stevie.c

stevie.c
23 Mar 2016, 00:28 ( Updated at: 21 Dec 2023, 09:20 )

RE:

trend_meanreversion said:

I would share one of sub-strategy for DAX which should provide some hope for fellow traders that it is not necessarily 'rocket-science' to create profitable strategies.

If you have heard of GAP strategy , then you would know that GAPs tend to get filled. So basically, i am saying that if  there are sharp moves in short time frame for DAX then they will get filled or at-least provide good buying opportunity in a sharp sell-off. 

Buy if High (previous candle) - Low(current candle) >= 50 points, then buy and hold with 20 mins .

This is a very basic version of strategy and you can do 'magic' with it if you include money management/position management ..opportunities are endless here..

Please find link of strategy at -> http://www.filedropper.com/de30gapmodel

Equity without any money management looks something like this  ( Return > 28% , MaxDD = ~8% )

 

 

Go crazy..i am sharing it just to give some hope to fellow traders that it is possible ( not easy ) to find an edge in this market :) . Have fun !

 

 

Hi T_MR,

Thanks for that. I recall reading about gap trading a while ago - good to know that it is a workable strategy. Thanks for the file too. I'll see if I can work something up with it.

It is interesting that effectively you're the only one on these forums that has replied to this survey with any positivity. That makes me think that either the people who do run a profitable automated system don't want to let on (unlikely..?), or perhaps that there are no profitable strategies that work reliably (which I hope is also unlikely!).


@stevie.c

stevie.c
17 Mar 2016, 20:09

RE:

Thanks Spotware. When you say that only the direction of the opening position is random, do you mean to imply that only the direction of the very first opening position is random, and that no others are? Doesn't the following ensure that any new trade is random..?

        private TradeType GetRandomTradeType()
        {
            return random.Next(2) == 0 ? TradeType.Buy : TradeType.Sell;
        }

Thanks.


@stevie.c

stevie.c
17 Mar 2016, 09:24

Thanks T_MR - I'll give that a go, although it sounds like that operates as a "live" function, i.e. the data would be dumped when prices were updated during a live market? What I was after was a way to look at a chart from any historical time period and export the data from that view.


@stevie.c

stevie.c
15 Mar 2016, 19:47

RE:

Anybody got any ideas..? Spotware..?

Thanks all.


@stevie.c

stevie.c
15 Mar 2016, 13:54

RE: RE:

trend_meanreversion said:

Hi Steve,

Just to provide motivation to people working with cAlgo to come up with good bots which can survive the tough world of automated trading , i would like to say that i do run some strategies successfully using cBot. I have advertised my bots in the cTDN forums so you should be able to see some screenshots of them. Let's go through questions which you raised

1) Did you develop the system/bot yourself?

Yes, i don't know someone who can help me with 'my' ideas as i am the only one who can understand what i want ,so better to implement them myself. I have learned a lot during this process and still keeps learning as i have been out of touch in terms of programming. I won't say my systems/strategies are completely new but they treat things differently for sure .Normally i basically create a hypothesis , let's say that multi-time Frame moving averages should provide me some info when to enter in trend. Then i will create a bot which will dump the price information along with different moving averages value in an excel file which i can easily manipulate to see if i can create a simple logic which shows promise. Once it is done , i will code the bot with the same logic and back test it using only 'tick' data to validate my hypothesis. And then i run them in demo account to see how it performs in forward test and compare against the back test. Once satisfied , they run in live environment.

3) How many indicators does the system use (to give us an idea of complexity)?

Very few probably only 2-3 at max, but mostly it tries to interpret the price action which acts as the trigger.

4) How often does the bot trade?

This is the tricky part as ideally i want too many trades so that i can become rich quick :) , but what i have found so far that beating spread in long term is a difficult task and becomes difficult with the high number of trades. So now i focus on high probability trades with money management . This means i have limited trades but with better conviction. I have got one DAX scalper which trades relatively frequently but still nowhere near to what i want ( ideally i want at-least 2-3 trades per day )

5) How many pairs does the bot trade?

I have focused my energy so far on Index CFDs but i do have a couple of interesting ideas/bots on FX.

6) What level of return are you getting on average per trade (either by percent or by pips)?

My only criteria for any strategy is to have atleast 2-3 annual return to MaxDD ratio. I can then leverage and gain accordingly.

7) How much maintenance does the bot require (i.e. can it be left running 24 hours a day for 1 week, 1 month, 1 year without intervention / updates)?

I can't just let my bots run for 1 week psychologically, so i run them everyday and then close them manually and re-run again in morning.

8) Any screenshots?

Check my profile.

 

Hope it helps. I just want to say that trading is tough and nothing comes easy. Try to leverage on information available on public domains, but think simple and particularly something which you can quantify easily ( so that you can code and backtest it with reliability ).

 

Hi T_MR,

Thanks for your well thought out and considered response - it is much appreciated and encouraging. Regarding backtesting, I have found that the trial bots I have developed seem to vary hugely in performance with only a tiny adjustment to parameters such as SL / TP. This makes me think that the bots are simply no use as they just would not be reliable in real operation.

 


@stevie.c

stevie.c
05 Oct 2015, 00:21

Thanks for having a crack at it Cyfer. However, the lag between the actual time and the time specified in the 'if' statement happens regardless of whether or not the time is displayed on screen, i.e. anything I put in the 'if' statement will occasionally be missed owing to the irregular value of DateTime.

Would anyone from Spotware care to comment or make any suggestions?

Thanks.


@stevie.c

stevie.c
04 Oct 2015, 02:33

As I stated in my first post, I have tried Server.Time and I get the same problem. Thanks though.


@stevie.c

stevie.c
03 Oct 2015, 13:23

Thanks for your input. The code is a very simple 'if' statement incorporating 'Notifications.Playsound' and 'ChartObjectsDrawtext', thus:

public override void Calculate(int index)
if (DateTime.Now.Minute == 59 && DateTime.Now.Second < 10)
    {
     Notifications.PlaySound("c:\\windows\\media\\tada.wav");
     ChartObjects.DrawText("MESSAGETEXT_1", "Alarm triggered at: " + DateTime.Now.ToLongTimeString(), StaticPosition.Center, Colors.Yellow);
     }

Now, ideally the 'if' statement should work with...

DateTime.Now.Minute == 59 && DateTime.Now.Second == 0

...but it does not, owing to these jumps that I'm observing (and as I mentioned before, it is not just my indicator that suffers from this problem). I've had to put DateTime.Now.Second < 10 in there in an attempt to overcome the jumping, so at least this way there is a 10 second window of opportunity for the 'if' statement to be true.

From reading older posts I am of the opinion that Calculate() perhaps only runs on a per tick basis at best, which then causes these jumps in time. Of course, this indicator would then never run when the markets are closed as Calculate() is not being called independently of the market status. As an aside, I cannot see why I should not be able to run such an alarm indicator outside of market hours if it is only using my system's DateTime.

 

 


@stevie.c

stevie.c
01 Oct 2015, 22:20

Can Spotware confirm/clarify...?

At the moment I tend to agree with you Paul, in that for an Indicator, Calculate() does not get called every second. Perhaps a Spotware representative can clarify?

 

 


@stevie.c

stevie.c
29 Sep 2015, 18:44

Thanks Paul.

I'm not sure that TimeSpan will provide a solution to the problem I'm encountering - I've experimented with Market Trading Clock (MTC) and observed the same problem. To elaborate, in the MTC indicator I changed the clock format thus:

marketClocks.ClockFormat = "HH:mm:ss";

Now, when the MTC indicator clocks are observed on any chart, the seconds are displayed but will quite often pause and then jump 2 or 3 seconds to catch up. This seems to affect any accurate time check being performed, since the jump in time can mean that a test fails as the time might never equal the time being checked owing to the jump in seconds. I've tried DateTime.Compare but again the jumps affect the comparison. It seems like a simple thing such as testing the current time to an accuracy of 1 second and then triggering an event when a specified time is met is hampered by this problem.

Thanks again for your input.


@stevie.c

stevie.c
29 Sep 2015, 00:50

Hi Paul,

Thanks for the reply - very much appreciated. To clarify, I don't use OnTick or OnBar in my indicator. The display updates from within: public override void Calculate, just using ChartObjects.DrawText..., in a similar way to your Market Trading Clock indicator (which has been a very useful reference thank you). Also, I've already tried the approach you've suggested for testing the time and it suffers from the same problem as my current method, i.e. it is very hit-and-miss because DateTime.Now does not seem to provide a reliable, constant feed of data that updates on a second-by-second basis, so the detection of a later date might only become TRUE, say, several seconds AFTER it should have actually triggered. Any further advice would be very welcome!

 


@stevie.c

stevie.c
28 Sep 2015, 21:36

Thanks for responding. To explain further, my indicator tests DateTime.Now and if it is later than a specified time, an alarm should sound (called by Notifications.Playsound) and a message will be displayed on the chart (ChartObjects.DrawText) that the indicator is active on. The code builds successfully and I can add an instance to a chart.

So, for example, when 17:00:00 < DateTime.Now < 17:00:02 is TRUE (i.e. DateTime.Now = 17:00:01) I would expect the alarm to sound and the message to be displayed. However, this does not always happen (sometimes it will, sometimes it won't), and when I have displayed DateTime.Now on the chart (using ChartObjects.DrawText...DateTime.Now.ToLongString()) to troubleshoot the problem, I have observed that the time will not always update regularly, and will sometimes 'stop' on a value and then catch up several seconds later, seemingly when the chart itself updates. It makes me think that the accuracy/update frequency of the time source I'm using at the moment is dependent upon the refresh rate for the chart it is instantiated on, but surely this cannot be the case?

I hope I've explained it better for you? Thanks again.


@stevie.c