
Topics
Replies
PanagiotisCharalampous
20 Aug 2018, 10:25
Hi ryanoia@gmail.com,
Can you try using ModifyPosition instead of ModifyPositionAsync and let me know if this still happens?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Aug 2018, 10:21
Hi ryanoia@gmail.com,
Positions.Find("", Symbol, TradeType.Buy)
should work fine. What is the problem? Why do you expect it to be null?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Aug 2018, 10:10
Hi carlosdrcunha,
Your question is very vague. How do you want to compare them? For which period? Please write a clearer description of what you need and we might me able to provide a code sample.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Aug 2018, 10:07
Hi swingfish,
You can use PlotType.Points and leave the indices you don't want to be displayed empty
[Output("Result", Color = Colors.Red, PlotType = PlotType.Points)] public IndicatorDataSeries Result{ get; set; }
This way you will get points only for the period you wish to see.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Aug 2018, 10:03
( Updated at: 21 Dec 2023, 09:20 )
Dear usdissanayake@gmail.com,
Have you enabled email notifications in cTrader Settings?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Aug 2018, 10:00
Hi gunning.ernie,
There is no such option currently.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Aug 2018, 13:17
Hi ceacuk,
Can you please confirm that this does not happen on Spotware cTrader Public Beta? No exact day yet for the update but should be soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Aug 2018, 10:38
Hi fxwisdom1@gmail.com,
You have written the functions but you do not handle the events anywhere. Modify your OnStart as below
protected override void OnStart() { Positions.Opened += OnPositionsOpened; Positions.Modified += OnPositionsModified; Positions.Closed += OnPositionsClosed; }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Aug 2018, 10:05
Ηi ryanoia@gmail.com,
Yes you understood it correct. If your logical sequency is not dependent on the outcome of the market order execution, then you should probably use ExecuteMarketOrderAsync.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Aug 2018, 09:47
Ηι alex_mihail,
You can backtest this and check if positions are openen or closed during those hours in history.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Aug 2018, 09:40
Hi ctid386599,
Data for indicators is loaded for periods before the backtesting starts therefore you should not worry about this. You should havemany bricks created on starting your cBot. See example below.
using cAlgo.API; using cAlgo.Indicators; using cAlgo.API.Indicators; using System.Linq; using System; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { private Renko _renko; protected override void OnStart() { _renko = Indicators.GetIndicator<Renko>(10, 100, 3, "SeaGreen", "Tomato"); Print(_renko.Close.Count); } protected override void OnBar() { } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
17 Aug 2018, 09:27
Hi ryanoia@gmail.com,
See below
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 OpenPositions : Robot { [Parameter("Volume", DefaultValue = 1000, MinValue = 1, Step = 1)] public int Volume { get; set; } protected override void OnStart() { var gbpusd = MarketData.GetSymbol("GBPUSD"); ExecuteMarketOrder(TradeType.Buy, gbpusd, Volume, "order 1", null, 11, null); ExecuteMarketOrder(TradeType.Sell, gbpusd, Volume, "order 1", null, 11, null); PlaceStopOrder(TradeType.Buy, gbpusd, Volume, gbpusd.Ask + 16 * Symbol.PipSize, "myStopOrder", null, 11, null); PlaceStopOrder(TradeType.Sell, gbpusd, Volume, gbpusd.Bid - 16 * Symbol.PipSize, "myStopOrder", null, 11, null); var gbpjpy = MarketData.GetSymbol("GBPJPY"); ExecuteMarketOrder(TradeType.Buy, gbpjpy, Volume, "order 1", null, 11, null); ExecuteMarketOrder(TradeType.Sell, gbpjpy, Volume, "order 1", null, 11, null); PlaceStopOrder(TradeType.Buy, gbpjpy, Volume, gbpjpy.Ask + 16 * Symbol.PipSize, "myStopOrder", null, 11, null); PlaceStopOrder(TradeType.Sell, gbpjpy, Volume, gbpjpy.Bid - 16 * Symbol.PipSize, "myStopOrder", null, 11, null); var gbpcad = MarketData.GetSymbol("GBPCAD"); ExecuteMarketOrder(TradeType.Buy, gbpcad, Volume, "order 1", null, 11, null); ExecuteMarketOrder(TradeType.Sell, gbpcad, Volume, "order 1", null, 11, null); PlaceStopOrder(TradeType.Buy, gbpcad, Volume, gbpcad.Ask + 16 * Symbol.PipSize, "myStopOrder", null, 11, null); PlaceStopOrder(TradeType.Sell, gbpcad, Volume, gbpcad.Bid - 16 * Symbol.PipSize, "myStopOrder", null, 11, null); } protected override void OnTick() { // Put your core logic here } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 17:12
Hi ceakuk,
This issue has been fixed in Spotware cTrader Public Beta. A fix will be applied to brokers soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 16:50
Hi ctid386599,
It is not clear to us what do you need.
- What is custom renko? A cBot or an indicator? Can you post the code?
- Why do you need data from earlier periods and how are these data related to the cBot/Indicator?
If you give us some more information on what you are trying to do then we might be able to help you.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 14:49
Hi jsohail60,
Can you please try to clean your browser cache and let us know if this resolves the problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 12:01
Hi usdissanayake@gmail.com,
Thanks for posting in our forum. You can change your if statement to the following
if( _ema5.Result.HasCrossedAbove(_Wma.Result, 1)) { }
This will check if EMA has crossed WMA during the previous bar.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 11:58
( Updated at: 21 Dec 2023, 09:20 )
Hi Simon,
I cannot see any probem.
Can you send us a screenshot and the broker you use?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 10:54
Hi Simon,
cBots and custom indicators are not available on cTrader Web, they are only available on cTrader Desktop.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
16 Aug 2018, 10:43
Hi Patrick,
Have you tried this on another computer? I cannot reproduce it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
20 Aug 2018, 10:28
Hi usdissanayake@gmail.com,
Yes you can. Use the Notifications.SendEmail() method.
Best Regards,
Panagiotis
@PanagiotisCharalampous