
Topics
Replies
PanagiotisCharalampous
04 Aug 2020, 16:51
( Updated at: 21 Dec 2023, 09:22 )
Hi rohingosling,
Here it is
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 16:49
Hi samuel.jus.cornelio,
Can you please write in English? It will be easier for us to help you. The code is a mess, did you just copy and paste stuff?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 16:41
Hi crou,
You can check the Sample Trading Panel sample cBot that comes with the platform. It has examples of adding buttons to the charts.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 15:30
Hi koktos632,
There is no single expected outcome. Events will be triggered as soon as responses arrive from the server. Many operations happen asynchronously on the server therefore there is no expected sequence of events. Orders can be executed in any order.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 12:03
Hi alexnikon,
I used the same timeframes but the chart looks fine to me
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 11:58
Hi Vamsi,
To get rid of the exception, you need to change
//[Output("Signal")]
public IndicatorDataSeries SignalsData;
//[Output("Signal Index")]
public IndicatorDataSeries SignalsIndexData;
to
[Output("Signal")]
public IndicatorDataSeries SignalsData { get; set; }
[Output("Signal Index")]
public IndicatorDataSeries SignalsIndexData { get; set; }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 11:43
Hi fang0092,
. If I load the m1 bars ahead of time (before using the indicator) will it significantly reduce the loading time?
It will take the same time to load no matter where you call the function
Do the m1 bars loaded remain until I close ctrader?
They will stay in memory as long as you use the indicator.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 11:13
Hi fang0092,
There is not enough data loaded in your m1 bars. You need to load more history to obtain the data. See below
while (m1Bars.OpenTimes.GetIndexByTime(Rect1.Time1) < 0)
m1Bars.LoadMoreHistory();
var PRICE = m1Bars.HighPrices[m1Bars.OpenTimes.GetIndexByTime(Rect1.Time1) + i];
Print("for statement: price_tobreak is " + price_tobreak + " while high for this time is" + PRICE);
while (m1Bars.OpenTimes.GetIndexByTime(Rect1.Time1) < 0)
m1Bars.LoadMoreHistory();
var PRICE = m1Bars.LowPrices[m1Bars.OpenTimes.GetIndexByTime(Rect1.Time1) + i];
Print("for: price_tobreak is " + price_tobreak + " while low for this time is" + PRICE);
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 10:30
Hi Vamsi,
I cannot build this indicator. Can you please provide the actual working indicator and cBot?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 10:27
Hi fang0092,
Please provide the complete code so that we can reproduce the behavior.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 08:25
Hi namth0712,
The balance is available in ProtoOATrader.balance. The P&L of each position needs to be calculated using the position's entry price and the current symbol bid/ask price.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 08:22
Hi vamsi.rc,
Can you please send us some troubleshooting information (Ctrl+Alt+Shift+T) and paste the link to this discussion in the description?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 08:18
Hi kostya.bartchenkov,
No this is not possible at the moment.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 08:17
Hi samuel.jus.cornelio,
Here is an example
var rsi1 = Indicators.RelativeStrengthIndex(Bars.ClosePrices,14);
var rsi2 = Indicators.RelativeStrengthIndex(Bars.ClosePrices,15);
var rsi3 = Indicators.RelativeStrengthIndex(Bars.ClosePrices,16);
var rsi4 = Indicators.RelativeStrengthIndex(Bars.ClosePrices,17);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 08:14
Hi alexnikon,
Thanks for the additional information but the screenshot does not explain what is the problem with higher timeframes. Can you elaborate? What does it do and what should it do instead?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
04 Aug 2020, 08:10
Hi puppiebullet1,
Your code does not check for crossovers but if the price is above or below the SMA. Hence it will open trades on every tick. Try adding a condition that will check if positions are already open in that direction before placing a new one.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
03 Aug 2020, 16:09
Hi Bjorn,
1) The Last() method used in this example is this one.
2) You can use index to access indicator values from the cBot e.g. S2.B[index], but is more complicated to get the correct value than using Last() method.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
03 Aug 2020, 15:45
Hi alexnikon,
I cannot help you further at the moment because I have no idea what is the indicator expected to do. You need to provide more information of what the expected outcome should be and what does the indicator do instead. Screenshots would be helpful.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
03 Aug 2020, 15:19
Hi Bjorn,
You try something like this
if (!double.IsNaN(S2.B.Last(1)))
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
05 Aug 2020, 08:25
Hi yomm0401,
Just drag the time counter to the left
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous