Topics
16 Nov 2023, 07:42
 1088
 1
15 Nov 2023, 10:36
 1967
 16
Replies

Spotware
14 Oct 2013, 15:09

You can see this information in the Journal tab. At the end of each session a file is created in the cAlgo/Journals/ folder


@Spotware

Spotware
14 Oct 2013, 14:17

Please look at the whole example.

You need to find which index corresponds to the series which is of a different Timeframe than the instance of your indicator. 
So, use the method GetIndexByDate as in the example to find the index to use in your m15 series "expo". 


@Spotware

Spotware
14 Oct 2013, 11:49

Both robot optimization and importing of historical data will be implemented.


@Spotware

Spotware
14 Oct 2013, 11:44

RE:

Mocean said:

Instead of trailing it moves the Sl in one jump once a target is reached.

Jumping Stop = Move SL to X pips after Y pips profit. Same theory as Break-Even jump.

Yes, it may be implemented. We are looking into adding many options for protection in the future.


@Spotware

Spotware
14 Oct 2013, 10:55

You need to get the index that corresponds to the series that is in a different Timeframe. See the example: /forum/whats-new/1463#3


@Spotware

Spotware
14 Oct 2013, 10:49

RE:

pennyfx said:

I'm using version 1.10.34111

I just noticed that one of my bots no longer works and is giving me this error.

"Crashed in OnTick with MissingMethodException: Method not Found: 'cAlgo.API.Indicators.WellesWilderSmoothing.get_Result()'"

There is no method get_Result() in the definition of WellesWilderSmoothing Indicator.

The correct syntax would be:

WellesWilderSmoothing wws;
...
wws = Indicators.WellesWilderSmoothing(source, period);
...
var lastValue = wws.Result.LastValue;

 

I'm using Visual Studio to build my robots and everything has worked fine until recently.  I noticed that you changes some DLL files that I usually reference.  I used to reference cAlgo.Indicators.dll and cAlgo.API.dll.  It looks like cAlgo.Indicators has been renamed to Frontend.Indicators, so I updated my references in VS and everything compiles.   I run my bots in cAlgo by setting my bot as a base class of a bot in cAlgo.   This way of doing things used to work fine in the past.   Here's my code.  

cAlgo.API.dll is the only reference you need in visual studio.


@Spotware

Spotware
14 Oct 2013, 10:28

Volume needs to be rounded to 1000.

private int GetVolume()
{
    return ((int)(Account.Equity * 0.001) * 1000);
}

 


@Spotware

Spotware
11 Oct 2013, 16:54

Right now the events are raised when positions/orders are created by the robot. But we plan to introduce new events that can be used for all positions/orders.
 


@Spotware

Spotware
11 Oct 2013, 12:52

If you like send us the complete code to engage@spotware.com so that we can investigate this.


@Spotware

Spotware
11 Oct 2013, 12:49

Use a Request as in the second case and add the specific symbol.

/api/requests/marketorderrequest/symbol


@Spotware

Spotware
11 Oct 2013, 12:47

We plan to add an ability to run robots to cTrader if you want to trade manually and use robots. Will it be better in your situation? Can you describe why do you need to trade manually in cAlgo?
 


@Spotware

Spotware
10 Oct 2013, 12:19

RE:

supafly said:

Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks

We plan to implement a completely new API which will include methods for stop loss and take profit hit.


@Spotware

Spotware
10 Oct 2013, 11:14

We are aware of this problem and it will be fixed. Thank you.


@Spotware

Spotware
10 Oct 2013, 10:30

RE:

kricka said:

Hi,

as the forum threads are growing in numbers it needs to be sortable in a database so we can filter and search the forum.

Normal Threads     Author      Replies      Views      Last Comment

By clicking on the above tabs it will filter the section so we can easily find threads.

 

Thanks..

Thank you for the suggestion. We will add sorting functionality for the forum section.


@Spotware

Spotware
09 Oct 2013, 17:53

If you need to set the take profit at the OnPositionOpened event: 

        protected override void OnPositionOpened(Position openedPosition)
        {
            pos = openedPosition;
            if (openedPosition.TradeType == TradeType.Buy)
            {
                sl = Symbol.Ask - StopLoss*Symbol.PointSize;
                var tp = Symbol.Ask + TakeProfit * Symbol.PointSize;

                Trade.ModifyPosition(openedPosition, sl, tp);
            }
            else
            {
                sl = Symbol.Bid + StopLoss*Symbol.PointSize;
                var tp = Symbol.Bid - TakeProfit * Symbol.PointSize;
                Trade.ModifyPosition(openedPosition, sl, tp);
            }
        }

If you also need to set the take profit in the OnTick event when the position is modified, please provide the logic.


@Spotware

Spotware
09 Oct 2013, 09:34

The problem is actually the take profit is set to 0. It should be null if you don't want to set the take profit, i.e.:

Trade.ModifyPosition(posistion, stopLossValue, null);

 


@Spotware

Spotware
08 Oct 2013, 17:59

RE:

hosseinkhorshidi said:

why do  my question erase?!!!

am i a bad man?!

Dear Trader,

Posts are not erased. In case the message is removed there will be a message that the post has been removed by the moderator due to a violation(s) of the EULA, in it's place.

We have not found any posts by you that have been removed. You might have clicked the cancel button instead of Submit by accident.


@Spotware

Spotware
08 Oct 2013, 15:40

If you have modified the code, please post it so that we can investigate further. The value of the Stop Loss is probably too low.


@Spotware

Spotware
08 Oct 2013, 12:34

Thank for the report, it will be fixed.


@Spotware

Spotware
08 Oct 2013, 11:30 ( Updated at: 21 Dec 2023, 09:20 )

RE:

hosseinkhorshidi said:

Mr Spotware or Mr algotrader or a programmer person,(I dont know all!), could edit above robot?

it is NECESSARY for me

thank you

Have you experienced the issue in backtesting?
What are the input parameters you have used
Can you send a screenshot such as the following showing that the stop loss is not added properly on position modified, for the backtest?


@Spotware