What can I do to get the program to stop trying to place buy stop orders below the market; which is causing my program to disable itself?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
BuyStop orders
Collapse
X
-
BuyStop orders
Hello,
What can I do to get the program to stop trying to place buy stop orders below the market; which is causing my program to disable itself?Tags: None
-
Hi AdeptistJune, thanks for posting. The strategy is trying to place the buy stop order either too close to the market price and the price changes before the order is submitted or the original price is below the market. You will need to compare the price you are setting the order at to GetCurrentAsk() to make sure the price is above the ask or place the order further away from the market price (from the ask price).
Kind regards,
-ChrisL
-
Hello Chris,
How would I compare the price I'm setting the order at to GetCurrentAsk()?
if(price > GetCurrnetAsk())
{
EnterLongStopMarket();
}Last edited by AdeptistJune; 05-12-2022, 09:18 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
61 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
32 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
44 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
58 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
47 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment