Topics
Replies

firemyst
28 May 2024, 06:49

RE: Log window not showing the correct time

PanagiotisCharalampous said: 

It uses your cBot's timezone. If there isn't one set, it's UTC+0

Well, that's annoying. According to the way it's implemented, if I wanted any cBot to log in local time for the time zones I go through because I travel often, I would have to update, recompile, and redeploy the bot every single time I cross a timezone to update the bot instances with the timezone I'm in? 

Who decided that?! O.M.G. face palm

cTrader can certainly determine if the cBot is running locally (and not in the cloud), and can also determine if there's a timezone set or not.

If I start a cBot on a VPS that's set for my local time zone running an instance of cTrader bot locally (not in the cloud) set to the current timezone I want to use, then why doesn't the bot, by default if no time zone is specified and it's running locally, use the local time zone?! 

It makes more sense to use the timezone the user has selected in cTrader in than a default UTC+0.

 


@firemyst

firemyst
28 May 2024, 00:13

is this a beta version?

Speaking of issues, look how much more memory this new version requires. I used to be able to run 2 copies of version 4.18 on a VPS with 4GB of ram and still have plenty of memory space left over. 

Now when I start 2 copies of cTrader 5.0.xx on a VPS with 4GB of ram, there's only like 740k of memory left. The VPS hasn't changed, so it can't be blamed on Windows.


@firemyst

firemyst
27 May 2024, 05:47 ( Updated at: 27 May 2024, 11:23 )

RE: RE: How to calculate stop out level?

savetree.eatbeaver said: 

firemyst said: 

Try going through this example:

 

https://help.ctrader.com/trading-with-ctrader/conditions/#fair-stop-out

 

 

Thank you, I know this example, but it doesnt help me.

Lets assume I have 100USD on my account (leverage 1:500). I want to open only one position (LONG) on that account (EURUSD).

And I want this position to be stopped out by the broker when market drops for 20 pips.

How can I calculate size for that position?

 

Using Google? First result for me:

https://www.earnforex.com/forum/threads/how-to-calculate-maximum-position-size-by-stop-out-level-and-margin-leverage.48897/

 

 


@firemyst

firemyst
25 May 2024, 13:37 ( Updated at: 26 May 2024, 06:44 )

Try going through this example:

 

https://help.ctrader.com/trading-with-ctrader/conditions/#fair-stop-out

 

 


@firemyst

firemyst
25 May 2024, 13:32

Well, does the file actually exist there? if not, that's obviously why you're getting that error.


@firemyst

firemyst
20 May 2024, 23:54 ( Updated at: 21 May 2024, 05:35 )

Search for the error and Read the documentation:

 

https://help.ctrader.com/ctrader-algo/compiling/#parameters

 


@firemyst

firemyst
15 May 2024, 14:09 ( Updated at: 16 May 2024, 05:31 )

Have you Googled for samples using C#?

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/advanced/how-to-add-data-to-the-clipboard?view=netframeworkdesktop-4.8

In your cBot, you may need it to have elevated permissions. For example:

 [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]

 


@firemyst

firemyst
03 May 2024, 20:58

Let's start simple. Does your indicator work as expected?


@firemyst

firemyst
03 May 2024, 20:56

The short answer is I don't believe it's possible. Once a cbot starts, it only operates on the current account. That's it.


@firemyst

firemyst
02 May 2024, 16:52

I believe you have to set it for each symbol and it “remembers” your last setting.

So try the following:

  1. switch to your demo account
  2. place an order with the lot size you want for each symbol you are going to trade
  3. switch back to your live account, open up the order window, and see if it remembers the last trade you did.

@firemyst

firemyst
22 Apr 2024, 17:50 ( Updated at: 23 Apr 2024, 05:47 )

You can write your own indicator to do this.


@firemyst

firemyst
22 Apr 2024, 17:50 ( Updated at: 23 Apr 2024, 05:47 )

If you had a total of 10 lots, how do you expect to have two take profits of 9 lots each? That in itself is 18, which is more than the 10 you have. 

 

If you want any help, then maybe you should try specifying what your order actually was and what the original lot amount was when you entered your position.


@firemyst

firemyst
22 Apr 2024, 17:46 ( Updated at: 23 Apr 2024, 05:47 )

This is not a suggestions forum

 

You need to post here:

https://ctrader.com/forum/suggestions

 

 


@firemyst

firemyst
21 Apr 2024, 09:05 ( Updated at: 22 Apr 2024, 05:35 )

Or you could write you own, and import the Python into your custom C#. Basic steps would be:

  1. Install the Python for . NET library: "pythonnet".
  2. In your C# code, import the "pythonnet" namespace.
  3. Use the "Py. Import" method to import your Python module.
  4. Use the "Py. ...
  5. Convert data between C# and Python using "PyObject" instances.

 

https://somegenericdev.medium.com/calling-python-from-c-an-introduction-to-pythonnet-c3d45f7d5232

 

 


@firemyst

firemyst
17 Apr 2024, 16:46 ( Updated at: 18 Apr 2024, 05:52 )

RE: RE: cTrader "pip scale" constantly goes flukey, and nowhere near being correct

PanagiotisCharalampous said: 

firemyst said: 

Hello Team @Spotware / @PanagiotisCharalampous

Any further updates on a fix for this issue?

Thank you

Hi firemyst,

We had no luck reproducing this issue therefore we cannot fix it at the moment.

Best regards,

Panagiotis

It's still doing this as of today, April 17th with version 4.8.30.

Doesn't the @Spotware team want to remote desktop and/or something else to get to the bottom of it? It's OBVIOUSLY an issue since I can reproduce it and have provided several videos showing it happening and can still reproduce the issue at will.

It happens when I switch between saved templates on an indicie (like the NAS 100) with a broker that has a pip size set at 0.1 points instead of 1 point on that indicie. 

 


@firemyst

firemyst
17 Apr 2024, 16:34

So no updates on this @Spotware?


@firemyst

firemyst
17 Apr 2024, 08:56 ( Updated at: 17 Apr 2024, 08:58 )

RE: RE: RE: RE: RE: RE: Heiken Ashi Candles

gbg561 said: 

firemyst said: 

gbg561 said: 

 

Hi, I thought there were only custom Heiken Ashi candles? where would I find the built in heiken ashi candles? Thanks

 

Thanks, but how do I get that into the code? 

 

Bars haTimeFrame = Bars.GetBars(TimeFrame.HeikinHour2);

//Now the time data is stored in the haTimeFrame variable. Put this in your “OnStart” or “Initialize” methods depending on whether you're writing a bot or indicator so it only gets the data once. If you put it in OnTick or Calculate, it's going to waste valuable CPU and network bandwith trying to reload the data on each tick.

 


@firemyst

firemyst
16 Apr 2024, 15:27 ( Updated at: 17 Apr 2024, 05:42 )

RE: RE: RE: RE: Heiken Ashi Candles

gbg561 said: 

 

Hi, I thought there were only custom Heiken Ashi candles? where would I find the built in heiken ashi candles? Thanks

 


@firemyst

firemyst
16 Apr 2024, 08:36 ( Updated at: 17 Apr 2024, 05:42 )

RE: RE: RE: Heiken Ashi Candles

PanagiotisCharalampous said: 

gbg561 said: 

firemyst said: 

Because that appears to be a custom indicator you are using… if you know how, you need to import them into your project or add them as a reference in Visual Studio.

Hi firemyst,

Thanks for your reply.

I am new to this, how would I import tem into my project?

Many thanks

Gary

Why do you need to use the custom indicator and not use the built in heikin ashi candles instead?

Maybe because they want to see the HA candles on a regular candle chart? I sometimes do the same thing.

There's also numerous indicators that do this as well as are quite popular.

For example:

https://www.tradingview.com/script/pjl3mIvc-Smoothed-Heiken-Ashi/

https://stonehillforex.com/2023/03/heiken-ashi-smoothed-as-a-confirmation-indicator/

 

 

 


@firemyst