Topics
Forum Topics not found
Replies
cAlgo_Fanatic
24 Jul 2013, 16:46
The code of that indicator does not output the values of the trendlines into an IndiatorDataSeries but draws the lines using ChartObjects.DrawLine.
Look at the Sample Trend Robot in the platform for an example on how you could utilize a trend indicator in a Robot.
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 15:20
RE:
Many thanks. It works just perfectly!
To support: I believe it should be part of he platform, together with many other standard and popular indicators (ichimoku, PSAR, ..)
Three new standard indicators have been added to cTrader/cAlgo: Average True Range, Ichimoku Kinko Hyo and Donchian Channel.
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 14:58
RE:
is it possible to add more data to the platform or how would you run a 10 year backtest? my ic markets demo only goes back 1 year for backtesting.
The backtesting period has been expanded to 2.5 years for the major currency pairs. We plan to expand it more in the future.
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 14:50
The period for backtesting has been expanded to 2.5 years for the major currency pairs. We plan to expand it more in the future.
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 14:44
The backtesting period range has been expanded to 2.5 years for the major currency pairs. We plan to expand it more in the future.
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 14:38
Three new standard indicators have been added to cTrader/cAlgo: Average True Range, Ichimoku Kinko Hyo and Donchian Channel.
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 12:59
RE:
Dear Support,
first of all, thank you for the indicator, I have been waiting for it. Will you have the option to change the colours of the elements to "none" as it's possible in Metatrader? It would really help when you use only certain elements of the indi or you use several layers of the indicator of different timeframes on the same chart. Thank you!
Regards,
Remz
Hello,
It is possible to do this currently with cTrader Web.
@cAlgo_Fanatic
cAlgo_Fanatic
23 Jul 2013, 15:22
Currently you cannot change the style of lines. It will be available in the future.
You may do this through the API (custom indicators and robots).
@cAlgo_Fanatic
cAlgo_Fanatic
23 Jul 2013, 12:44
Thank you for reporting this, we will investigate promptly.
@cAlgo_Fanatic
cAlgo_Fanatic
22 Jul 2013, 17:43
What do you want OpenPrice to be set to? Most probably you are assigning a NaN value to it if the indexing is not right. This could result if lastIndex is smaller than backBars.
You may use Print statements throughout the code, to output the values assigned to variables that are used in the conditions that open/close trades, for instance. This way, you can identify what could be wrong.
Please be advised that the drawing of lines, has not been implemented for backtesting.
@cAlgo_Fanatic
cAlgo_Fanatic
22 Jul 2013, 16:15
RE:
Whereas I'm not a particularly big fan of this trading strategy, and I think a lot of brokers will do what they can to try and prevent it from being possible, I do agree completely with Mocean, that if the logic is as described, where an order with an SL attached first gets entered without the SL, then the SL is verified, and if rejected the order still stands, then that is completely unacceptable.
The entire thing should get rejected in the first place.
First, the order goes to the market, where it gets executed. Then a position is created/affected. Only then is protection applied to the position. Therefore, there is no way to "reject the entire thing in the first place".
We believe that introducing "relative protection" for pending orders plus killing the above validation, will be sufficient to achieve what you have described.
@cAlgo_Fanatic
cAlgo_Fanatic
22 Jul 2013, 10:00
You can reference a custom indicator by clicking the button "Add Reference" next to the "build" button in the text editor code view.
A line will be insterted automatically on the top of the code file.
The rest of the code will be similar to the above example, except for initializing:
myIndicator = Indicators.GetIndicator<MyIndicator>(Param1, Param2, ...);
You can see this platform robot sample: "Sample Robot Reference SMA" which references the platform "Sample SMA" Indicator as an example.
@cAlgo_Fanatic
cAlgo_Fanatic
19 Jul 2013, 17:59
As indicated by Spotware's tick data, the spread at time of execution was 18.7pips - I understand it was a news event but this is a pretty big spread for supposedly direct market prices and deep liquidity.
Bid 1.50995 11:30:00.205
Ask 1.51182 11:30:00.205 // Buy stop order was filled at this price
The amount of spread depends on various factors but does not have anything to do with the platform. Prices come directly from the Liquidity Provider and are not modified.
Spotware has indicated that their platform functions like this - even if a pending order has a SL attached, once the pending order is executed the SL is "verified", meaning the SL is only attached to the position once it's executed. Basically double handing the SL. If the SL is inside the spread it won't trigger and is rejected. Why reject a SL? If the price has moved beyond the SL then it should be triggered immediately - this is called SLIPPAGE. The whole point of a SL is to STOP LOSS - not consider it, then reject it. I see this as a major flaw in Spotware's programming logic and business rules.
Due to multiple broker/trader requests the functionality became as follows:
I have traded the news with straddle pending orders on Trading Station and MT4 and never had a SL not fire. Sure I've had slippage but that's trading.
Most other platform setups are on Instant, meaning this scenario is just not applicable. Also, there's a required gap between entry price and the protection level. Spotware is different.
- introduce what we call Relative Protection for Limit and Stop orders - the same way as we have it done for Market Orders - desired protection levels are defined by users in pips from the executed price which would give us the logical space not to validate
OK, so now to the big kicker. After the SL failed, the trade continued into loss and kept going. The platform failed to initiate a Margin Call and close the trade and it continued into unlimited loss. Luckily I was watching it, as I run cAlgo on a VPS it could have very well been a trade I was not watching. Imagine your surprise to find not only your account is blown but now you're underwater and in debt. My broker is also extremely concerned by this as they would be the one most at risk. Like I'm going to be paying back a negative account that failed to close a trade.
@cAlgo_Fanatic
cAlgo_Fanatic
19 Jul 2013, 16:38
This cannot be done at the moment. It may be implemented in the future.
@cAlgo_Fanatic
cAlgo_Fanatic
19 Jul 2013, 12:05
This feature has been implemented and will be available in the next releases.
@cAlgo_Fanatic
cAlgo_Fanatic
19 Jul 2013, 11:01
The "Technical error" in the log is not related to SL. The Robot tried to cancel the second (sell) stop order in 1 second, but it was already triggered. So there was an error.
We will be replacing the generic "Technical Error" term that is rather confusing with more detailed messages in the next two-three releases.
@cAlgo_Fanatic
cAlgo_Fanatic
19 Jul 2013, 09:56
We apologize for this inconvenience. You can use this code instead in order to get the same results as before:
//... _standardDeviation = Indicators.StandardDeviation(MarketSeries.Close, 14, MovingAverageType.Simple); //... double result = _standardDeviation.Result[index] * 2; //...
@cAlgo_Fanatic
cAlgo_Fanatic
18 Jul 2013, 16:39
We've investigated your issue. Here is an explanation of what really happened:
16.07.2013 08:29:59.190-345
Two stop orders (buy and sell) were created, both with SL=2pips.
The Buy order's target price was 1.51142, SL price 1.51122
16.07.2013 08:30:00.205
The buy order was triggered with the price 1.51182 and then the price had gone down
16.07.2013 08:30:00.622
The buy order was filled at the price 1.51182
16.07.2013 08:30:00.628
Server applied SL and TP to the created position, but SL was rejected due to SL validation rule: SL price for buy order must be always less than the current price.
Current Bid was 1.50976, but requested SL was 1.51122.
Prices:
Bid 1.51126 11:29:59.071
Ask 1.51136 11:29:59.071
Bid 1.50947 11:29:59.122
Bid 1.50944 11:29:59.229
Bid 1.50939 11:29:59.281
Ask 1.51127 11:29:59.281
Bid 1.50934 11:29:59.492
Bid 1.50954 11:29:59.744
Ask 1.51148 11:29:59.744
Bid 1.51114 11:30:00.000
Ask 1.51137 11:30:00.000
Bid 1.50995 11:30:00.205
Ask 1.51182 11:30:00.205 // Buy stop order was filled at this price
Bid 1.50983 11:30:00.463
Ask 1.51062 11:30:00.463
Bid 1.50976 11:30:00.630 // This bid was used to validate SL price
@cAlgo_Fanatic
cAlgo_Fanatic
24 Jul 2013, 17:26
Thank you for the suggestion, we do have it in our plans to implement.
@cAlgo_Fanatic