Topics
Replies
zedodia
24 Jun 2019, 14:00
RE:
Panagiotis Charalampous said:
Hi zedodia,
We cannot help you via the forum. The accounts belong to the brokers so they should be able to trace who created the account. If they cannot find out they should contact Spotware support for further information.
Best Regards,
Panagiotis
will do. thanks
@zedodia
zedodia
14 Jun 2019, 16:29
Thanks again. Youve opened a can of worms for me now lol. Im unsure why you make the market order a variable and how to use it that way.
This is what i have now - except it crashes.
=================================
using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class NewcBot : Robot
{
[Parameter("Fractal Period", DefaultValue = 5)]
public int _period { get; set; }
private Fractals _fractal;
protected override void OnStart()
{
_fractal = Indicators.GetIndicator<Fractals>(_period);
}
protected override void OnBar()
{
var _fractaldn = _fractal.UpFractal.LastValue;
var _fractalup = _fractal.DownFractal.LastValue;
var _lPos = Positions.Find(null, Symbol, TradeType.Buy);
if (_lPos == null)
{
ExecuteMarketOrder(TradeType.Buy, Symbol, 1000, null);
_lPos.ModifyStopLossPrice(_fractaldn);
}
}
}
}
@zedodia
zedodia
16 Jul 2018, 13:15
protected override void OnPositionOpened(Position openedPosition)
{
pos.Add(openedPosition);
ModifyPosition(openedPosition, SL, TP);
}
protected override void OnPositionClosed(Position position)
{
for (int i = 0; i < pos.Count; i++)
{
if (pos[i].Id == position.Id)
{
pos.RemoveAt(i);
break;
i get this errors
Error CS0672: Member 'cAlgo.Robots.GravyTrain.OnPositionOpened(cAlgo.API.Position)' overrides obsolete member 'cAlgo.API.Robot.OnPositionOpened(cAlgo.API.Position)'. Add the Obsolete attribute to 'cAlgo.Robots.GravyTrain.OnPositionOpened(cAlgo.API.Position)'.
Error CS0672: Member 'cAlgo.Robots.GravyTrain.OnPositionClosed(cAlgo.API.Position)' overrides obsolete member 'cAlgo.API.Robot.OnPositionClosed(cAlgo.API.Position)'. Add the Obsolete attribute to 'cAlgo.Robots.GravyTrain.OnPositionClosed(cAlgo.API.Position)'.
@zedodia
zedodia
16 Jul 2018, 11:44
otherwise this is the line and error i get.
Trade.CreateBuyMarketOrder(Symbol, lots);
which says to 'Use ExecuteMarketOrder instead" but when i change it the bot fails to build
I also get a problem with a line
protected override void OnPositionOpened(Position openedPosition)
any help is greatly appreciated
thankyou
@zedodia
zedodia
16 Jul 2018, 11:39
( Updated at: 15 Jan 2024, 14:51 )
I got it.. thankyou.. now im trying a different bot and ive got all the problems removed except 6 things.
[Andrey Pisarev do yoiu have an email i could send you the code to? i dont want to post this code here right this minute.]
thankyou
@zedodia
zedodia
08 Jul 2018, 12:24
RE: x6
Im finding that building a bot is very difficult. the language is just not taking to my brain atm. is there a good way to learn the coding? ive been trying to learn from the bots on this site and work backwards.
patrick.sifneos@gmail.com said:
If manual trading can work, then algo-trading works 1000% better. There is no better way to trade than algo-trading. I am profitable over 1.5 years, just with one single bot running on 28 major forex pairs. However, you will never find a bot to buy, if someone sells it, do not buy, it will not work. Build your own bot!!!
Good Luck!!!
zedodia said:
Im still new to bots, ive been trading for a while now but bot facinate me for many reasons. im trying to find an actual bot that will be profitable. is this a dream or is it actually something i can obtain and help escape the rat race?
@zedodia
zedodia
29 Jun 2018, 09:47
Thankyou very much. im trying to learn the code. in calgo - where do i find the codes for different things. as an example
{
SimpleMovingAverage SlowMA, FastMA;
Position Pos;
protected override void OnStart()
{
SlowMA = Indicators.SimpleMovingAverage(MarketSeries.Close, 100);
FastMA = Indicators.SimpleMovingAverage(MarketSeries.Close, 50);
}
in this section, i would like to alter the type of indicator i use. lets say i want to change it to a weighted moving average. in the right hand coloum there is a list. is this where i find the correct syntax to replace the 'SimpleMovingAverage'?
sorry if this is a super noob question. once i know where to look i can usually work most things out with playing.
@zedodia
zedodia
07 Nov 2019, 01:13
create a template, save it, close ctrader, load template.
create a workspace, save it, close ctrader, load workspace.
ive had this problem since 3.5 and dont know why it doesnt work. on the odd occation it does save, but it never lasts.
@zedodia