Topics
Replies
banbeng
11 Nov 2012, 18:18
RE: Hi,
If by MTF you mean multi time-frame EMA then i can tell you that this is something that we are currently working on.
Therefore, ability to write a multi-timeframe indicator will soon be possible.
@banbeng
banbeng
16 Oct 2012, 22:18
// ------------------------------------------------------------------------------- // // This is a Template used as a guideline to build your own Robot. // Please use the “Feedback” tab to provide us with your suggestions about cAlgo’s API. // // ------------------------------------------------------------------------------- using System; using cAlgo.API; using cAlgo.API.Internals; using cAlgo.API.Indicators; using cAlgo.Indicators; namespace cAlgo.Robots { public class Tool { //public Position pos; //Info informazione=new Info(); int decimali=0; public Tool(int decimalii) { this.decimali=decimalii; } //arrotonda// //arrotonda// public double round(int dir, double cos , double pipsize) { double norm,ln=0; if(decimali!=-1){ ln=Math.Round(cos,decimali);} else { Console.WriteLine("Error");} if(dir==-1) { if(ln<cos){norm=ln;} if(ln="=cos){norm=ln;}">cos){norm=ln-1* pipsize;} } if(dir==1) { if(ln<cos){norm=ln+1* pipsize;}="" if(ln="=cos){norm=ln;}">cos){norm=ln;} //Trade.CreateSellStopOrder(Symbol,1000,Symbol.Bid,null,null,null); } return ln; } } }
@banbeng
banbeng
16 Oct 2012, 01:09
RE:
Hello,
In cAlgo you need to define each class in a separate file. Then you need to reference that file in the class which you want to use it. The filenames should be the same as the classes defined in them, i.e. class Imperial should be saved in filename Imperial.cs
e.g.
//#reference: ..\Robots\Opertation.algo using cAlgo.API; namespace cAlgo.Robots { public class Imperial : Robot { private Opertation robot; // etc. } }
@banbeng
banbeng
14 Oct 2012, 20:39
( Updated at: 23 Jan 2024, 13:11 )
" For modifying Pending Orders please visit: [/docs/reference/calgo/api/internals/itrade/modifypendingorder] "
I read the page but I can not understand how to change the price of entry for the pending order!
if i have bid at 1.2301
and a sell entry at 1.2290
how can i cange this entry to 1.2280??
can i use this syntax??
foreach( PendingOrders pos in Account.PendingOrders) //position sono attivi pendingorder passivi! { if(pos.symbolcode==symbol && pos.TradeType=TradeType.Buy ) { // API for pending modify } }
I hope I've been clear as much as possible
@banbeng
banbeng
11 Oct 2012, 13:22
" If you press a key then the dropdown list produced does contain Account as well as Symbol. "
I don't have this (account, symbol) in mai dropdown list!
in my program I created 4 different classes
public class tool
{
}
public class Mainr: Robot
{
}
...
I can not access symbol because this class is not
: robot?
@banbeng
banbeng
09 Oct 2012, 00:15
you can modify a pending order?
I read the feature, Trade.ModifyPosition, but I think one can only apply to active orders, as it should also amend the entry point
(for bank ect, the movement of change an order is more rapid than closing down an order and open a new order)
@banbeng
banbeng
08 Oct 2012, 23:06
thanks as always
all very clear
I wonder if it is normal for transferring what we say to the platform I do not take
as pre-set words
account
symbol
I have underlined the words that did not give any reaction to the program
public int ord_at() { int q=0; foreach( var pos in Account.Positions) //position sono attivi pendingorder passivi! { if(pos.symbolcode==symbol) { q++; } } return(q); }
ver. 1.0.78
it is normal that these words(account/sybol) do not appear in the dropdown menu???
@banbeng
banbeng
07 Oct 2012, 11:26
thanks for the replies
how do I filter the active orders from pending orders
those on this symbol than total
I would like to create a method to tell me how many orders there are active on this symbol (obviously the control must request this information to the platform)
exempol!!
for (int i = 0, to position.orderstotats (esempol 100), i++)
{
if ( position[i].type== active && position[i].symbol==symbol ) {totalat++;}
if ( position[i].type== pendent && position[i].symbol==symbol ) {totalat++;}
}
@banbeng
banbeng
26 Nov 2012, 22:27
RE:
@banbeng