Topics
Replies
ctid+customer-395444
12 Jun 2023, 16:13
( Updated at: 21 Dec 2023, 09:23 )
Of course you're getting that error.
See what the API is expecting?
Not a double value, which you have as "0.001".
You need to pass it the "Bars" you want, or remove the first parameter entirely to use the current chart's bars.
@ctid+customer-395444
ctid+customer-395444
12 Jun 2023, 16:02
Have you tried altering the access rights permissions of your bots?
@ctid+customer-395444
ctid+customer-395444
10 Jun 2023, 05:22
Have you tried looking for any free ones that someone may have done already?
If not, you can see if anyone else on these forums help out.
@ctid+customer-395444
ctid+customer-395444
09 Jun 2023, 15:17
if (distance between current ask or bid price and current take profit price is within x-pips of yourposition.TakeProfit.GetValueOrDefault())
{
yourPosition.ModifyTakeProfitPrice( yourposition.TakeProfit.GetValueOrDefault() + (Symbol.PipSize * number of pips you want to move it forward);
}
@ctid+customer-395444
ctid+customer-395444
09 Jun 2023, 03:14
To make sure Spotware gets and receives this, please also report it through cTrader:
In the text box, put the link to this thread.
If you can, also put in the technical details from the event-viewer you captured as well.
@ctid+customer-395444
ctid+customer-395444
09 Jun 2023, 03:09
The code you have gets the EMA values for the Higher Time Frame, which is the daily chart.
The charts you're showing in the screen captures are the 4 hour charts.
So while on the GBPCHF 4-hour chart the fast email is below the slow ema, on the daily chart, the fast ema can still be above the slower ema, hence only the one arrow being displayed on the 4 hour.
@ctid+customer-395444
ctid+customer-395444
09 Jun 2023, 02:59
Another FAIL on Spotware's part by whoever's in charge of the API team.
See the example I left for you on your other thread with Moving Averages
@ctid+customer-395444
ctid+customer-395444
09 Jun 2023, 02:56
( Updated at: 21 Dec 2023, 09:23 )
RE:
jalmir.coelho@gmail.com said:
To load an Exponential average I use: Result = Indicators.Exponential Moving Average(Source, 8); How to load an Exponential Average with SHIFT according to the following image?
You can't do it directly with the API, which is a FAIL on Spotware's part (and whoever's in charge of the API team should be slapped for this). When needing the SHIFT parameter, Spotware's API includes it with other indicator api's like the Alligator, but not on the MA constructors where it's listed as a parameter. Who made this idiotic decision?
Anyway, the point being you have to do it yourself:
//Example to help you get started
[Parameter("Shift", DefaultValue = 0, MinValue = -100, MaxValue = 500)]
public int MAShift { get; set; }
public override void Calculate(int index)
{
//Do your own SHIFTing
int currentIndex = index + MAShift;
//Now get the shifted results from the moving average
Result[currentIndex] = _expMovingAverage.Result[index];
//the rest of your code
}
@ctid+customer-395444
ctid+customer-395444
08 Jun 2023, 14:24
RE:
ctid6182616 said:
What error messages, if any, do you get in the cTrader logs under the Automate tab?
I have received error messages like, "Crashed in Calculate method" or "Crashed in OnTick. Object reference not set to instance of an object".
@ctid+customer-395444
ctid+customer-395444
08 Jun 2023, 03:21
( Updated at: 21 Dec 2023, 09:23 )
RE:
jalmir.coelho@gmail.com said:
To load a Exponencial Average mean i use:
Result = Indicators.ExponentialMovingAverage(Source, 8);
How make to load a Exponencial Average with STANDART DESVIATION according to next image?
First, the "Shift" parameter has nothing to do with Standard deviation. The Shift parameter moves the results of the EMA either forward or backwards along the X-axis on the chart.
If you want a standard deviation, use either the standard deviation indicator, or the Bollinger Bands indicator. Both are located under the "Volatility" indicator submenu.
@ctid+customer-395444
ctid+customer-395444
08 Jun 2023, 03:18
I'm not sure why you think adjusting your clock will fix your code from failing to build?
If you want help, you need to post either your code, build error messages, both, or don't expect anyone to help you.
@ctid+customer-395444
ctid+customer-395444
08 Jun 2023, 03:16
RE:
jacopotrono said:
Hi everyone,
what is the best way to add choice of Symbol and TimeFrame on a script?
Example: RSI on EURUSD standard + RSI on EURUSD about EURCHF for same TimeFrame
Thanks in advance
For different symbols, I do a simple comma-separated text input. In the code, I just split the inputs at a comma, remove any white space, and then get the bars for each symbol I want.
To allow a user to select a different time frame than what's on the chart, just create a TimeFrame parameter:
[Parameter("Source Time Frame")]
public TimeFrame SourceTimeFrame { get; set; }
and use that parameter when getting the bars.
//Example
private Bars _marketSeries;
if (SourceTimeFrame != null)
_marketSeries = MarketData.GetBars(SourceTimeFrame, Symbol.Name);
else
_marketSeries = MarketData.GetBars(Bars.TimeFrame, Symbol.Name);
@ctid+customer-395444
ctid+customer-395444
07 Jun 2023, 16:17
( Updated at: 21 Dec 2023, 09:23 )
RE:
Spotware said:
Dear firemyst,
Thanks for reporting this issue. Our team is working on resolving it.
Best regards,
cTrader Team
This has happened again in release 4.7.9 @Spotware :
And the logging information from the event viewer:
@ctid+customer-395444
ctid+customer-395444
07 Jun 2023, 06:42
RE:
ncel01 said:
firemyst,
I'd make it clear that Pepperstone doesn't support cTrader copy when suggesting this broker, since it is quite likely that traders are also looking for this.
Just for kicks, I looked around and found Pepperstone have partnered with TradingView now as well if anyone is interested. Information in the link. Not sure how (if at all) it interacts with cTrader.
@ctid+customer-395444
ctid+customer-395444
07 Jun 2023, 03:39
Y1 is typically the first parameter that specifies a value along the Y-axis of the chart.
However, looking at your code, I didn't see anything wrong.
I then ran it in Visual Studio and there were no crashes or faults among 5 forex pairs and the US30 charts.
So what symbol and timeframe were you running this on?
@ctid+customer-395444
ctid+customer-395444
07 Jun 2023, 03:13
RE:
AlexFrei said:
I have one button for minimize this panel. If I click this button I would like to set focus to panel (or something different than textbox) programatically. But I didnt found any method for setting focus to control.
Thank you for your help
Alex
@ctid+customer-395444
ctid+customer-395444
13 Jun 2023, 17:09
RE: RE:
AlexFrei said:
Yes. And I've used external controls too like panels, checkboxes, etc, on my charts.
Spotware has plenty of examples on this website too:
@ctid+customer-395444