Topics
Replies
PanagiotisCharalampous
15 Nov 2023, 06:55
RE: force an indicator to refresh itself
Hi eynt,
No there isn't
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2023, 06:51
reply
Hi there,
Here is an example how to calculate the moving average for the high prices
var ma = Indicators.MovingAverage(Bars.HighPrices, 14, MovingAverageType.Exponential);
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2023, 06:51
reply
Hi there,
Here is an example how to calculate the moving average for the high prices
var ma = Indicators.MovingAverage(Bars.HighPrices, 14, MovingAverageType.Exponential);
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
14 Nov 2023, 09:57
Hi there,
Follower accounts are not accessible by an API. You can get a statement only for the user interface.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
14 Nov 2023, 07:09
Hi there,
If you are a broker, please contact your official support channel.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
14 Nov 2023, 07:06
Hi there,
I have deleted these indicators too. Can you please record a video demonstrating the steps you are taking to reproduce this problem?
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
14 Nov 2023, 07:03
RE: Moving average on indicator disappears
ctid797322 said:
they have to fix that shit its really annoying
Hi there,
We are not aware of any issue at the moment. Can you please provide us with steps to reproduce?
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
14 Nov 2023, 07:01
Hi there,
Here is some code to start with
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Robots
{
[Robot(AccessRights = AccessRights.None)]
public class NewcBot2 : Robot
{
DateTime _lastStopLoss;
protected override void OnStart()
{
Positions.Closed += Positions_Closed;
}
private void Positions_Closed(PositionClosedEventArgs obj)
{
if(obj.Reason == PositionCloseReason.StopLoss)
{
_lastStopLoss = Server.Time;
}
}
protected override void OnTick()
{
if(_lastStopLoss.AddHours(24) > Server.Time)
{
// Trade
}
}
protected override void OnStop()
{
// Handle cBot stop here
}
}
}
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 15:13
Hi there,
We cannot see any problems with the connection at the moment. Can you try to connect using Telnet and let us know the outcome?
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 14:53
Hi Takis,
Unfortunately I cannot reproduce such an issue. I will have to ask you one more time to share a video demonstrating the problem.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 14:39
( Updated at: 13 Nov 2023, 14:40 )
RE: RE: RE: RE: Cast error in cTrader project
noppanon said:
noppanon said:
noppanon said:
PanagiotisCharalampous said:
Hi Noppanon,
Unfortunately it is not possible to determine the problem with this information. Please send us the complete solution file to community@spotware.com
Hi Support,
I will create a simple indicator to reproduce the error. Please wait a couple days.
Noppanon
Hi Support,
Please download my solution from this link.
https://drive.google.com/file/d/1QXIlnSYDMtlEIWfxrd8LT2Ddm4qh5X8k/view?usp=sharing
Noppanon
May I have some update, please?
Hi Noppanon,
I have responded via Telegram
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 14:34
Hi eynt,
There is no built in way to do this, you would need to write your custom saving/loading functionality
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 06:38
Hi there,
This feature is not available at the moment.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 06:35
Hi there,
I have deleted the indicators.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 06:34
Hi there,
Market hours are set by the brokers. You might want to contact your broker instead.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Nov 2023, 06:28
( Updated at: 13 Nov 2023, 06:30 )
RE: Calculate profit in account dollars instead of pips
PanagiotisCharalampous said:
Hi there,
It's because it takes the average. If you want to close the position whenever the specific position reaches above that amount, the use this
if (Positions.Where(x => x.SymbolName == SymbolName && x.Label == ThiscBotLabel && x.NetProfit > AmountInProfit))
Hi there,
Remove the if statement and use the below loop instead
foreach (var position in Positions.Where(x => x.SymbolName == SymbolName && x.Label == ThiscBotLabel && x.NetProfit > AmountInProfit))
{
ClosePositionAsync(position);
}
@PanagiotisCharalampous
PanagiotisCharalampous
12 Nov 2023, 06:25
Hi there,
You need to pass bars to the indicator constructor, not a symbol. Check GetBars method.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Nov 2023, 06:22
( Updated at: 12 Nov 2023, 06:25 )
Hi there,
It's because you use the same name and the line is overridden. You need to use a unique name for each line
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
12 Nov 2023, 06:21
( Updated at: 12 Nov 2023, 06:25 )
Hi eynt,
No there isn't
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
15 Nov 2023, 06:56
RE: RE: Repeated Disconnections
eynt said:
Hi eynt,
It should be “not more” :) So after you get a disconnection, send the troubleshooting as soon as possible
@PanagiotisCharalampous