what is wrong with calgo

Created at 19 Oct 2014, 04:33
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
RA

rawand123

Joined 07.10.2014

what is wrong with calgo
19 Oct 2014, 04:33


 

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewcBot : Robot
    {
        protected override void OnStart()
        {
            ExecuteMarketOrder(TradeType.Buy, Symbol, 20000, null, 10, 10);
            Print(LastResult.Position.GrossProfit);
        }
    }
}

the algo prints 0 as a       GrossProfit          while the trade has lost 20$

this program is shit it does not understand you

you cant code complex strategy in c algo


@rawand123
Replies

rawand123
19 Oct 2014, 06:09

cant understand why it is not simple to code in calgo


@rawand123

rawand123
19 Oct 2014, 06:11

their tools are so simple

you will always be in middle of your coding and you realize that the tool you need is missing


@rawand123

Spotware
20 Oct 2014, 10:13

the algo prints 0 as a       GrossProfit          while the trade has lost 20$

Your code executes market order and prints unrealized Gross profit of corresponding position. If you want to access the historical trades please use the History collection.

this program is shit it does not understand you

you cant code complex strategy in c algo

We can recommend you to contact one of our Partners or post a job in Development Jobs section.


@Spotware