Coding Spread strategies

Created at 07 Feb 2020, 10:13
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!
DA

david.sanchez

Joined 07.02.2020

Coding Spread strategies
07 Feb 2020, 10:13


Hi

I am trying to backtest a spread strategy on ctrader.

 

Unfortunately, I am struggling with the c# implementation in c-trader.

 

I want to achieve something like this:

 

Spread  = EURUSD - AUDUSD

 

If upper Bollinger bands of spread <= current spread value

 

Then sell market

If pos >0 then close pos

And vice versa

I would need to run 2 versions of this strategy for each symbol (first leg on EURUSD, second leg on AUDUSD)

Can you help me out or give some sample code?

Sincerely,

David Sanchez


@david.sanchez