Topics
18 Aug 2020, 00:08
 1
 1082
 1
14 Jun 2015, 11:01
 3111
 4
Replies

RhettG
21 Sep 2017, 02:11 ( Updated at: 21 Dec 2023, 09:20 )

Hi Jared

I picked up the same kind of problem on the UK100 back in November last year. I approached IC Markets directly and, after a few mails explaining what the problem actually was and some false fixes, eventually they fixed the data.

So thats an option. Good luck


@RhettG

RhettG
24 Jun 2016, 04:14 ( Updated at: 21 Dec 2023, 09:20 )

Backtesting with CSV data

Hi

I've loaded up data for 4 years on the DAX from a CSV file but there's no option to start the testing or to select dates according to the data I have. What do I do next?


@RhettG

RhettG
14 Sep 2015, 11:03

RE:

Spotware said:

You need to replace long parameter to int parameter.

Hi. Sorry for bringing up an old thread.

Why?

I'm using long integers all over the place. Why can't I use one now? ExecuteMarketOrder needs a long for volume. How do I calculate volume if I can't use long?

This has me really confused. I copied some code from one working bot to another and now I get this message.

Thanks


@RhettG

RhettG
03 Jul 2015, 13:56

Hi

So:

OnPositionClosed - Only handles positions opened by this instance of this bot

OnPositionsClosed - Handles any and all positions on your account

Correct?

What if I stop the bot and start it again later with trades opened by the previous version still in the system?

What about stop and limit orders placed by this instance of this bot? It seems to me they aren't included in OnPositionClosed when they close and I have to manipulate the comment and label fields to keep my bot running on only its own trades. 

Is there any thought to including positions opened by stop and limit orders in the OnPositionOpened and OnPositionClosed methods?

I often want to use the comment and labels for other things and I can't edit those while a trade is open so its tricky (I seem to have lots of code manipulating, concatenating and splitting strings so I can see exactly what my bots are doing. One day when I am an expert coder I'll have more confidence.)

Thanks for a great product. Keep up the excellent work.


@RhettG

RhettG
16 Jun 2015, 01:30

Thank you that works.

I'm pretty sure I tried that over the weekend and it didn't do any amazing stuff at all. Is there some reason it wouldn't work over the weekend? I guess the more feneral question is "Is there some reason the results from backtesting would be different over the weekend when the markets are offline to during the week?"

Thanks

(p.s. position.closedtime would be way more logical but I'm not going to use up a vote for it. When your devs are completely bored and have nothing to do they can think of it.)


@RhettG

RhettG
20 May 2015, 08:13

Hi again

I looked at that again and the stray tick wasn't down to my sell-stop, it took my sell stop down by more than 20 pips. So maybe the world and the markets aren't against me individually but I'm just collateral damage along the way :)


@RhettG

RhettG
10 Sep 2014, 15:04

Thanks for the reply.

The web page says "Every time the position moves higher than 1.35300, the stop loss will also move the same distance upwards. The trailing stop will never retreat or move down from its new position."

My question is when exactly is the new stop loss calculated? I am watching 1 minute charts and I see the price move per tick but the stop loss doesn't update for every tick of movement. Right now I am watching an open short trade with an active trailing stop and as the price drops I see the trailing stop update 20 seconds into the minute bar and sometimes 40 seconds into the minute bar but it doesn't even update the trailing stop when the minute close was more than the set amount below the previous stop loss. At one point now, with a trailing stop setting of 3 pips, the stop loss was at 2.7 pips of profit, the close of the previous bar was at 6.2 pips profit and the instantaneous tick was at 6.4 pips of profit. A few seconds later (20 seconds into the minute roughly) the last tick showed 6.1 pips of profit and the stop loss updated to 3.1 pips.

Forgive me I know I'm being pedantic and this is extreme scalping but it is a demo account and I'm really just trying to understand the mechanisms. For reference on my stock market broker I set trailing stops to trigger if the current market price drops by a set amount from the previous day's close or the previous day's limit, whichever is lower. This works well and I completely understand it.

Thanks


@RhettG

RhettG
10 Sep 2014, 13:13

Hi

 

Thanks for an excellent tool. I'm rapidly growing to love cTrader.

Could you elaborate on exactly how the trailing stop is working please? When does it decide how much and modify the stoploss according to the rules? I've been placing trades (in demo), applying the trailing stop once they execute, waiting the required pips for them to activate, and watching them follow the price as expected. However I don't see them update the stoploss at the end of a bar (sometimes it updates during the time period) and I'm not sure if its updating the stoploss according to the close, high/low (for long or short trades), or what.

Thanks

 

RhettG


@RhettG