Topics
Replies
DelFonseca
03 Apr 2018, 21:20
With more than 4 years waiting and is one of the most powerful trading tools.
Spotware cant give feedback? We paid cTrader commission for what? We dont only want a more beautiful application, we want tools ..
To be honest I'm thinking of leaving this platform.
@DelFonseca
DelFonseca
15 Feb 2018, 20:15
RE:
Panagiotis Charalampous said:
Hi DelTrader,
Most probably your condition is not fulfilled
if (myPositionsSymbol1.Length <= (MaxOpenTradesSymbol1 - 1) && Symbol1Spread <= MaxSpreadSymbol1) {However we cannot advise further if we don't know what this condition is supposed to do and what do the parameters mean. For example, we don't know what MaxOpenTradesSymbol1 or LabelSymbol1
Best Regards,
Panagiotis
I always apreciate your help Panagiotis!
When i start cBot, he ExecuteBuyStrategySymbol1() without problems.
Here the parameters:
Thank you
[Parameter("Max Open Trades Symbol 1", DefaultValue = 1)] public int MaxOpenTradesSymbol1 { get; set; } [Parameter("Symbol 1", DefaultValue = "EURUSD")] public string Symbol1 { get; set; } private const string LabelSymbol1 = "MaybeIMaybeYou V6.1 - Symbol 1";
@DelFonseca
DelFonseca
02 Feb 2018, 16:09
Good afternoon,
Sorry, but my English is not perfect.
For each trade of profit or loss, I want to add the value of "EquityProfitClose" to the balance.
Example:
Opening balance: € 1000
EquityProfitClose: € 10
If I apply "Takeprofit = Account.Balance + EquityProfitClose" there is no problem because the take will be given at 1010 €, but if it was a loss, I would have the balance of 990 € (so far so good) but the next trade would take the € 1000 ("Takeprofit = Acchount.Balance + EquityProfitClose") and in reality I wanted to take 1020 € which would be the value of the takeprofit of the lost trade
Another example,
Let's imagine 10 trades followed with profit, Takeprofit will always be +10 €, but in the eventualdiade of losing a trade, I want as profit the previous continuity, 1010 €, 1020 €, 1030 €, ... 1090 €, 1100 €.
Thank you so much
@DelFonseca
DelFonseca
29 Jan 2018, 20:07
RE:
Panagiotis Charalampous said:
Hi DelTrader,
This is not possible using cAlgo.API. You can do that using Connect API however this is not so simple therefore I cannot provide you with an example code. You will need advanced coding skills to achieve that.
Best Regards,
Panagiotis
Thank you so much for your help. I wil study Connect API.
Best Regards
@DelFonseca
DelFonseca
26 Jan 2018, 19:58
RE:
Panagiotis Charalampous said:
Hi DelTrader,
See below a correct way to write this function
protected override void OnTick() { (...) }Let me know if this helps,
Best Regards,
Panagiotis
Perfect!! You'r the guy !! Thank you so much. Im trying creating Triangular Arbitrage Bot. Thank you so much !!!
@DelFonseca
DelFonseca
25 Jan 2018, 23:04
Helo again,
I have 2 problems now, im trying calculate Bid-Ask to get single result but i cant. And im trying Create if structure but i cant.
The problem with operators '-' and '>', because they cant be apllied in operands of type 'string'.
Can you help me?
The structure:
protected override void OnTick() { var Symbol1MarketData = MarketData.GetSymbol(Symbol1); var Symbol2MarketData = MarketData.GetSymbol(Symbol2); var Symbol3MarketData = MarketData.GetSymbol(Symbol3); var Symbol1Low = MarketSeries.Low.LastValue; var Symbol2Low = MarketSeries.Low.LastValue; var Symbol3Low = MarketSeries.Low.LastValue; var Symbol1Bid = Symbol1MarketData.Bid.ToString(); var Symbol2Bid = Symbol2MarketData.Bid.ToString(); var Symbol3Bid = Symbol3MarketData.Bid.ToString(); var Symbol1Ask = Symbol1MarketData.Ask.ToString(); var Symbol2Ask = Symbol2MarketData.Ask.ToString(); var Symbol3Ask = Symbol3MarketData.Ask.ToString(); var Symbol1Result = Symbol1Bid - Symbol1Ask; var Symbol2Result = Symbol2Bid - Symbol2Ask; var Symbol3Result = Symbol3Bid - Symbol3Ask; if (Symbol1Result > Symbol2Result > Symbol3Result) { ExecuteMarketOrder(TradeType.Buy, Symbol, VolumeInUnits); } }
@DelFonseca
DelFonseca
25 Jan 2018, 20:24
RE:
Panagiotis Charalampous said:
Hi DelTrader,
See an example below
using System; (...)Best Regards,
Panagiotis
HI Panagiotis,
Thank you, thank you so much !! You're awesome !! Cheers
@DelFonseca
DelFonseca
24 Aug 2017, 22:48
RE:
Spotware said:
Dear deltrader.pt@gmail.com,
It seems that your take profit/stop loss parameters are passed as absolute prices rather than in pips. Can you please check this?
Best Regards,
cTrader Team
Hello, Actually my stoploss / takeprofit is calculated as price but in the default calgo is in pips. Is it possible put stoploss / takeprofit as a price and not as pips? If so, can you help me? I have already done a search without success. thank you so much.
@DelFonseca
DelFonseca
21 Aug 2017, 23:06
Im trying this, but dont work
protected override void OnBar() { DateTime _lastExecutedOrder = DateTime.Now; if (_lastExecutedOrder.AddDays(-1) < DateTime.Now) { ExecuteStrategy(); } else { return; } }
@DelFonseca
DelFonseca
11 Aug 2017, 20:30
RE:
Spotware said:
Dear deltrader.pt@gmail.com,
What do you mean when you say that the pending order should move along with the ASK price? Do you mean that you need to place a limit/stop order 5 pips away from the ask price?
Best Regards,
cTrader Team
Hello, No, a pending order that moves along with the price. Imagine that the price is in the 100 points, the pending order is in the 105. If the price rises to 110, the pending order rises to 115 and if it goes down to 100, the pending order moves to 105.
Thank you
@DelFonseca
DelFonseca
09 Aug 2017, 20:46
RE:
dleeeq8 said:
var DailyOpen = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime[0]);this line used index 0 for OpenTime
index 0 means first bar in history of your TimeFrame
you need to use last index or before last -> here i use last one not current open one
var DailyOpen = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime.Last(1));for current open bar use 0:
MarketSeries.OpenTime.Last(0);if you want to see is last bar a Green or Red bar
Close - Open = +1 or -1
var dframe=MarketData.GetSeries(TimeFrame.Daily); if(dframe.Close.Last(1)-dframe.Open.Last(1) > 0) { // last Daily Bar is Green }else{ // last Daily Bar is Red }do your tests
gl
Thank you, thank you so much.
With the "dframe" code it was perfect. The other one could not apply because it gives errors that I cant solve (lack of experience). Once again, thank you !!
@DelFonseca
DelFonseca
23 Jul 2017, 20:07
RE:
lec0456 said:
If you wanted to place a trade everyday at 8:15 UTC, for example, you could just say:
If (Server.Time.Hour==8 && Server.Time.minute==15)
Execute Trade...
you get the daily series by:
Daily = MarketData.GetSeries(TimeFrame.Daily);
And the index by:
var dailyindex = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime[t0]);
and get yesterdays high by:
Daily.High[dailyindex-1];
Thank you so much lec0456.
i'll try.
tanhk you
@DelFonseca
DelFonseca
19 Jul 2017, 23:23
[Parameter("Multiply Lots when Win", DefaultValue = true)]
public bool MultiplyLotsOnWin { get; set; }
[Parameter("Max Multiply Lots", DefaultValue = 1)]
public int MaxMultiplyLots { get; set; }
(...)
private double _initialQuantity = 0;
void Positions_Closed(PositionClosedEventArgs obj)
{
if (MultiplyLotsOnWin && obj.Position.SymbolCode == Symbol.Code && obj.Position.Label == label)
{
if (_initialQuantity == 0)
_initialQuantity = Quantity;
Quantity = (obj.Position.Pips > 0) ? Quantity * 2 : _initialQuantity;
}
}
@DelFonseca
DelFonseca
30 May 2018, 22:51
RE:
Panagiotis Charalampous said:
Thank you so much !!!!
Solved:
@DelFonseca