It seems the Donchian trading system you coded and provided under the Download section has a bug. Please see the system detail below.
The Donchian trading system, as discussed by Oscar Cagigas in his article in this issue, “The Degree Of Complexity,” has been implemented as a strategy available for download at www.ninjatrader.com/SC/February2014SC.zip.
The error message I am getting each time an order is submitted by the strategy are:
For a Sell order:
"CQG, Sell stop or sell stop limit orders can't be placed above the market. affected Order: Sell 1 Stop @ 0.8973"
Strategy 'DonchianTradingSystem/0a8986f90bc040aab87b397e3b027179' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
And, for a buy order:
CQG, Buy stop or buy stop limit orders can't be placed below the market. affected Order: BuyToCover 1 Stop @ 0.8971
Strategy 'DonchianTradingSystem/0a8986f90bc040aab87b397e3b027179' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
Please see if this can be rectified.
Many thanks
Comment