![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2008
Posts: 42
Thanks: 0
Thanked 0 times in 0 posts
|
IOrder entryOrder = EnterShortStop(1,entry);
results in CS0029 - Cannot implicitly convert type void to NinjaTRader.Cbi.IOrder Other overloaded EnterShortStop methods work fine and return a IOrder Object (as documented). Version is 6.5.1000 (Live) |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Hi michaelbb,
You will want to first do this in Variables: Code:
private IOrder entryorder = null; Code:
entryOrder = EnterShortStop(1, entry);
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2008
Posts: 42
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Josh,
my code was to demonstrate the compiler error. Is your code compiled on your NinjaTrader version? On my version the EnterShortStop method is defined as: void EnterShortStop(int quantity, double stopPrice) It should be: IOrder EnterShortStop(int quantity, double stopPrice) |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Hi michaelbb,
I see what you mean now. Thanks for bringing this to our attention. I will get in contact with development.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Entershortstop not reversing long position and vice versa | verge | Strategy Development | 1 | 05-02-2008 07:42 AM |
| EnterLongStop and EnterShortStop | Mathemagician | Strategy Development | 6 | 02-01-2008 04:38 PM |