Open()

Created at 03 Apr 2015, 22:03
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!
JE

JeremyG

Joined 26.03.2015

Open()
03 Apr 2015, 22:03


Hi,

I'm new to C#/cAlgo and I'm trying to learn from some of the example cBots.

I noticed in the Sample RSI cBot that there are Open() and Close() methods in use:

private void Close(TradeType tradeType)

and:

if (rsi.Result.LastValue < 30)
{
Close(TradeType.Sell);
Open(TradeType.Buy);
}

 

However I can't find these methods in the documentation - can anyone explain what these are and how to use them (or point me to documentation)?

 

Thanks,

Jeremy

 

 

 


@JeremyG
Replies

Manuel_Meza
03 Apr 2015, 22:39

RE:

Son Metodos, que tu creas... tu decides que quieres que hagan y que no... no son metodos que vienen con el programa. Espero te sirva...

 

JeremyG said:

Hi,

I'm new to C#/cAlgo and I'm trying to learn from some of the example cBots.

I noticed in the Sample RSI cBot that there are Open() and Close() methods in use:

private void Close(TradeType tradeType)

and:

if (rsi.Result.LastValue < 30)
{
Close(TradeType.Sell);
Open(TradeType.Buy);
}

 

However I can't find these methods in the documentation - can anyone explain what these are and how to use them (or point me to documentation)?

 

 

Thanks,

Jeremy

 

 

 

 


@Manuel_Meza

JeremyG
05 Apr 2015, 21:07

But you have methods like OnTick() etc, they are 'built in' - So in this case is Open() just a name/holder for the 'TradeType.buy' function?

Thanks!


@JeremyG

JeremyG
05 Apr 2015, 22:12

Ok I got it now.. The 'If' is calling the method created below it..


@JeremyG