Topics
Replies

firemyst
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
}

 


@firemyst

firemyst
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".


@firemyst

firemyst
08 Jun 2023, 03:22

Yes.

You have to code it.


@firemyst

firemyst
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.

 


@firemyst

firemyst
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.


@firemyst

firemyst
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);

 


@firemyst

firemyst
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:

 

 


@firemyst

firemyst
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.


@firemyst

firemyst
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?


@firemyst

firemyst
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

 

 


@firemyst

firemyst
07 Jun 2023, 03:09

 


@firemyst

firemyst
06 Jun 2023, 11:38 ( Updated at: 21 Dec 2023, 09:23 )

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.

 

You're right. They don't support cTrader copy natively in the application, but Pepperstone does support social trading through 3rd parties as detailed on their website:

 

So yes, if that's what people are looking for, they should contact Pepperstone to confirm first.

In this case, the OP's primary requirement was to trade smaller lot sizes, which Pepperstone supports (at least in the South Pacific).

 

 


@firemyst

firemyst
06 Jun 2023, 09:52

RE: RE: RE:

pjs.guernsey said:

firemyst said:

Revobot said:

I can't open a 0.10 position on Us30 in ctrade? I do it in metatrader, but web ctrader doesn't allow me to open a 0.10 lot position, only 1 lot

 

I would suggest signing up with Pepperstone. They allow lot sizes of 0.1 on US30 and other indices.

Are you sure? I tried with cTrader in the past and on indexes could not get 0.1 lot size on indexes with Pepperstone. I have a Pepperstone account. I gave up on CTrader because of this limitation. There are no brokers I could find that seemed decent enough and also support the lot sizes needed with cTrader and that are also available to me.

I'm 100% sure because I use Pepperstone cTrader now for trading, and can trade 0.1 lots sizes on US30, and 0.01 sizes on forex pairs.

Proof in the pudding:

 


@firemyst

firemyst
06 Jun 2023, 08:04

When you back test do you take into account spreads and commission costs?


@firemyst

firemyst
06 Jun 2023, 08:03

RE:

Revobot said:

I can't open a 0.10 position on Us30 in ctrade? I do it in metatrader, but web ctrader doesn't allow me to open a 0.10 lot position, only 1 lot

 

I would suggest signing up with Pepperstone. They allow lot sizes of 0.1 on US30 and other indices.


@firemyst

firemyst
02 Jun 2023, 10:41

For your first request, post it in the Suggestions Forum:

 


@firemyst

firemyst
02 Jun 2023, 10:40 ( Updated at: 21 Dec 2023, 09:23 )

What error messages, if any, do you get in the cTrader logs under the Automate tab?

Also, have you submitted the technical information to Spotware?


@firemyst

firemyst
02 Jun 2023, 10:34

You can also check out the examples Spotware provided:

 


@firemyst

firemyst
02 Jun 2023, 04:01

RE:

ncel01 said:

firemyst,

If you consider this as a bug how would you classify cTrader memory leaks? A detail?

Although it is okay to report any issue (of course), I prefer to focus on cTrader core issues, that's why I said I didn't even consider this to be an issue.

By core issues I mean issues that directly have impact on your trading outcome/results, which is not the case here.

In the programming world, a bug is a bug.

Some bugs can be complete showstoppers, and others just a minor nuance.

It's up to Spotware to decide the priority of bugs.

With the sorting, any developer at Spotware should be able to track down the query in the mobile version code, fix, and unit test it in less than an hour before uploading their latest changes into the main development branch for the next round of product testing and subsequent official release.

One developer's time of less than an hour is not going to have an overall noticeable impact on the product release cycle.

If it does, Spotware has bigger issues at hand.

Otherwise, I'm not spending any more time discussing bug semantics.


@firemyst