Help Please! Spread Robot

Created at 17 Oct 2013, 00:26
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!
MR

MrTrader

Joined 12.06.2013

Help Please! Spread Robot
17 Oct 2013, 00:26


Hello,

 

I am currently developing a new robot,

Can anyone help make a code for: 'Don't open position if spread is over 1 pip' 

 

That would be great.


@MrTrader
Replies

Cerunnos
17 Oct 2013, 10:15

RE:

MrTrader said:

Hello,

 

I am currently developing a new robot,

Can anyone help make a code for: 'Don't open position if spread is over 1 pip'

 

That would be great.

 

If(Symbol.Spread <= xy)
{  var request = new MarketOrderRequest(TradeType.Buy, vol) ... }  

or

double _Spread = Symbol.Ask - Symbol.Bid
If(_Spread <= xy)...

 


@Cerunnos

MrTrader
17 Oct 2013, 16:07

RE: RE:

Cerunnos said:

MrTrader said:

Hello,

 

I am currently developing a new robot,

Can anyone help make a code for: 'Don't open position if spread is over 1 pip'

 

That would be great.

 

If(Symbol.Spread <= xy)
{  var request = new MarketOrderRequest(TradeType.Buy, vol) ... }  

or

double _Spread = Symbol.Ask - Symbol.Bid
If(_Spread <= xy)...

 

 

 

Hello,

 

I'm getting a problem, 

Its telling me a Identifier is expected? 


@MrTrader