Topics
Replies

firemyst
20 Apr 2023, 05:29

First, you'll probably want to get the current index:

int lastIndex = Bars.OpenTimes.GetIndexByTime(Bars.OpenTimes.LastValue)

Then you can loop over the last 5 indexes:

int low = Int32.MaxValue;

for (int x=lastIndex - 5; x <= lastIndex; x++)

{

  if (Bars.LowPrices[x] < low)

    low = Bars.LowPrices[x];

}

 

The above is all pseudo code so may not work exactly as is since I'm not in front of anything other than a tablet typing this.

If you want to find the index of another bar, assuming you're on a chart that's based on time (eg, not Renko or Range bars), then in the call to Bars.OpenTimes.GetIndexByTime, provide the time of the bar that you want.

Hope that helps?


@firemyst

firemyst
19 Apr 2023, 09:09

No idea why you posted this when you already can:

 

 

 


@firemyst

firemyst
19 Apr 2023, 09:06

 


@firemyst

firemyst
19 Apr 2023, 09:06

Then look in the cBot repository:

 

 

 


@firemyst

firemyst
18 Apr 2023, 15:44

The Output has to be an IndicatorDataSeries.

If you want a public property that other indicators/cBots can access, then you have to remove the [Output] designation and leave it as a public property in your class.

//Example:

//Instead of this:
 [Output("bearCrossActive")]

  public bool bullCrossActive;  


//You need to do this:
  public bool bullCrossActive;  


//or create your own indicator data series as an output:
public IndicatorDataSeries bullCrossActive

 

See this thread for some more information:

 


@firemyst

firemyst
18 Apr 2023, 15:29

RE:

ifchoms said:

Please add a trailing stop to profit
with many thanks

No idea what you mean because cTrader has always had the trailing stop option. Just modify your order and tick the "trailing stop" option.


@firemyst

firemyst
18 Apr 2023, 15:23 ( Updated at: 21 Dec 2023, 09:23 )

RE:

remon said:

Hello, 

 

It would be nice to be able to show/hide an indicator inthe "Object Manager" screen the same way it's already possible for Drawings. This way you don't have to add/remove an indicator because you don't want to see it for a moment (and change all the settings). This makes the "Object manager" then a shortlist of used indicators which you only have to show/hide.


@firemyst

firemyst
18 Apr 2023, 15:20

See also this thread:

 

Vote on all of them


@firemyst

firemyst
18 Apr 2023, 15:20

See also this thread:

 

VOte on all of them


@firemyst

firemyst
18 Apr 2023, 15:16 ( Updated at: 21 Dec 2023, 09:23 )

Or you write your own SuperTrend that connects the dots or get one that someone else has developed.

For example:


@firemyst

firemyst
18 Apr 2023, 15:14

RE:

rahzelh said:

Hi

Please allow to add more than 1 indicator in one indicator's window. It is very much useful and is so much missing in cTrader platform.

Thanks!
Roman

Especially for oscillators.


@firemyst

firemyst
18 Apr 2023, 15:13 ( Updated at: 21 Dec 2023, 09:23 )

RE:

.ics said:

Hi,

It would be nice if we could edit our topics on the forums after posting.

For example, if we want to

  • correct some mistakes or typo's
  • add some additional info
  • etc...

Greetings

You can do this.

Bottom right corner of your post. You need to be logged in to do it:


@firemyst

firemyst
18 Apr 2023, 15:09 ( Updated at: 21 Dec 2023, 09:23 )

You can already do this. Right click on the chart, select viewing options, and then disable Indicator Tiles.


@firemyst

firemyst
18 Apr 2023, 15:00

cTrader Automate has the local storage ability now with the latest version.

Prior to this version, with the system.io, you need to grant the indicator/bot "full access" in the permissions so it can write to the local file system.

Assuming the folder where you want to write to has write permissions.


@firemyst

firemyst
18 Apr 2023, 14:59

You could try using "cTrader Copy" and linking your accounts so they all copy off your one account.

 


@firemyst

firemyst
18 Apr 2023, 14:58

I would add this here:

 


@firemyst

firemyst
18 Apr 2023, 14:57

I would post this suggestion here:

 

 


@firemyst

firemyst
18 Apr 2023, 14:56

I feel like it should work as you have it.

However, perhaps it's acting the way it does because with some brokers like IC Markets, users cannot trade in 0.01 lots. I believe their minimum is 0.1 lots. Maybe that's the issue?

I would try you code on two different brokers that allow for different sizes. For instance, Pepperstone allows for 0.01 lots, so try it with Pepperstone and then IC Markets and see what happens?


@firemyst

firemyst
18 Apr 2023, 10:31 ( Updated at: 21 Dec 2023, 09:23 )

RE:

Spotware said:

Dear trader,

Unfortunately we were not able to reproduce this problem. Please provide us with the following information

  • Please share the logs of each application.
  • Please let us know which workspace you use in each application
  • After you share the above information here, send us troubleshooting from both machines the next time this happens. Add a link to this discussion in the description.

Best regards,

cTrader Team 

I've sent through the information via the "report a technical issue" option in cTrader.

Here's a screen capture from cTrader now running on VPS with NAS Re8 chart. Notice the "deal maps":

 

Now check out the same chart on my local laptop:

You can see same chart (NAS Re8), but laptop (bottom capture) is missing at least 2 deals.

Same broker, same demo account.

Let me know what other information you may need from either machine.

 


@firemyst

firemyst
18 Apr 2023, 09:33

I see in your code you're not capturing the trade result, which would tell you if it's successful or not.

See example:

 


@firemyst