Topics
Replies

firemyst
26 Jan 2025, 14:00 ( Updated at: 14 Feb 2025, 18:17 )

NOt sure what you're asking for?

Just set the parameters of the indicator on your chart


@firemyst

firemyst
26 Jan 2025, 13:58 ( Updated at: 14 Feb 2025, 18:16 )

Do you still get the error?

I don't save anything like this to OneDrive - I don't think cTrader is smart enough to handle it yet.


@firemyst

firemyst
26 Jan 2025, 13:56 ( Updated at: 14 Feb 2025, 18:19 )

Google.

There's multiple free ones you can download:

https://clickalgo.com/martingale-trading

https:// community.ctrader.com / algos / cbots / show / 3 /

 

 


@firemyst

firemyst
26 Jan 2025, 13:51 ( Updated at: 14 Feb 2025, 18:16 )

Is this still an issue with the latest version?

I've done it before and haven't had any problems


@firemyst

firemyst
26 Jan 2025, 13:47 ( Updated at: 14 Feb 2025, 18:16 )

Business logic:

(pip value * number of pips) - commissions - swap


@firemyst

firemyst
26 Jan 2025, 13:46 ( Updated at: 14 Feb 2025, 18:16 )

See this duplicate thread for updates:

https://community.ctrader.com/forum/ctrader-algo/44856/

 


@firemyst

firemyst
26 Jan 2025, 13:44 ( Updated at: 14 Feb 2025, 18:16 )

What's your account balance and margin levels? That will cause cTrader to stop you from entering trades.


@firemyst

firemyst
26 Jan 2025, 13:42 ( Updated at: 14 Feb 2025, 18:16 )

Since nobody else cared to provide any feedback, what I would suggest if it's causing you grief is to delete the pending order and then create a new one with the SL, TP, Volume, and entry price.


@firemyst

firemyst
26 Jan 2025, 08:15 ( Updated at: 14 Feb 2025, 18:19 )

You've provided nothing to show people what's happening versus what you expect to happen.

You also need to provide code samples that replicate the problem because for all we know, there's an issue with your code.


@firemyst

firemyst
26 Jan 2025, 08:13 ( Updated at: 14 Feb 2025, 18:19 )

They've added a new “ProtectionType” parameter that @Spotware has provided no documentation, answers, or anything else about to numerous posts in the forum that have asked about it.

I'll update my thread:

https://community.ctrader.com/forum/cbot-support/46002/

as soon as, or if ever, I find/receive an answer.


@firemyst

firemyst
26 Jan 2025, 08:11 ( Updated at: 14 Feb 2025, 18:19 )

Numerous people have been posting and asking about it, and @Spotware has yet to respond to anything.

I would suggest you keep track of this thread:

https://community.ctrader.com/forum/cbot-support/46002/

as I'll update my post as soon as I find/receive an answer.


@firemyst

firemyst
26 Jan 2025, 08:08 ( Updated at: 14 Feb 2025, 18:19 )

I don't think you've read the API documentation carefully, because there's only two types of API calls for the ATR:

  1. AverageTrueRange AverageTrueRange(int periods, MovingAverageType maType);
  2. AverageTrueRange AverageTrueRange(Bars bars, int periods, MovingAverageType maType);

and your code does neither.

For either one, you need to provide the moving average type, of which you haven't done so in your code.


@firemyst

firemyst
26 Jan 2025, 07:58 ( Updated at: 14 Feb 2025, 18:19 )

You need to be a bit more specific. Where's an example where it doesn't work?

Do you have any screen captures showing what happened versus what you expected to happen? 


@firemyst

firemyst
26 Jan 2025, 07:41 ( Updated at: 14 Feb 2025, 18:19 )

Well unless you post some code, or messages from the logging tab, how do you expect anyone to help you?

It's like going up to a mechanic and saying you're car doesn't work today, but did yesterday. How do you expect him to fix it without you showing them the car?


@firemyst

firemyst
26 Jan 2025, 07:40 ( Updated at: 14 Feb 2025, 18:19 )

RE: RE: Ctrader bot ignores code and blown my account!

Dennis1 said: 

firemyst said: 

Why haven't you run your bot locally and do a “back test” for the dates Dec 16th - 20th to see if anything happens that you can pin point? 

 

Run your backtest against tick data and see what happens.

Of course I have run the backtest over those days. It shows that bot didn't open any trades since none of the entry criteria have been met. Yet on live account it went wild and made 1166 trades in 40mins!

What protection do you have built into your bot? For instance:

  1. do you check spreads before you bot opens a position?
  2. do you  have anything that checks for x-number of losing trades and to stop your bot if it reaches that threshold?
  3. do you have anything that checks for x-number of losing pips and to stop your bot if it passes that threshold?

 

While this doesn't help you to resolve what happened, these are a few suggestions to build safety-nets into your algos as it doesn't seem like you have any to prevent your bot from blowing an account again .

As a programmer you need to consider such things when programming algorithms for the unpredictable markets, regardless of how sound your strategy may be.

 


@firemyst

firemyst
26 Jan 2025, 07:34 ( Updated at: 14 Feb 2025, 18:19 )

I don't believe you can do a “push” notification, but you can send emails and telegram messages from calgo.

Otherwise, See this page for more info:

https://help.ctrader.com/ctrader-id/managing-ctid/notifications/

 


@firemyst

firemyst
26 Jan 2025, 06:42 ( Updated at: 14 Feb 2025, 18:19 )

If you're not using the standard MACD from cTrader in your code, you need to add a reference to the file you are using in cTrader:

  1. click on Algo m enu
  2. click on your bot/indicator
  3. once code is shown, at top of screen click “References”
  4. add your reference

@firemyst

firemyst
26 Jan 2025, 06:38 ( Updated at: 14 Feb 2025, 18:19 )

Have you look at any error messages in the logging tab? 

Do you have the latest version of cTrader (Eg, have you asked them if they developed it for a minimum version and you don't have that version?)

 


@firemyst

firemyst
26 Jan 2025, 06:37 ( Updated at: 14 Feb 2025, 18:19 )

Well unless you post some code, or messages from the logging tab, how do you expect anyone to help you?

It's like going up to a mechanic and saying you're car doesn't work today, but did yesterday. How do you expect him to fix it without you showing them the car?


@firemyst