NexusFi: Find Your Edge


Home Menu

 





Wizard for creating a strategy; exit and stoploss interference


Discussion in NinjaTrader

Updated
    1. trending_up 1,710 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 bjarne 
Breda NL
 
Experience: Beginner
Platform: NT
Trading: QM
Posts: 10 since Oct 2016
Thanks Given: 2
Thanks Received: 0

Hello fellows,

I created an strategy by using the strategy wizard as a non coder I am.
By using it I created an entry Long en exit long and the same for the short side.
In the following item you can choose to add an stoploss; as I did.
In backtesting and optimalisation no problems detected but I market replay an error is created and the strategy stops running.

Is someone familiar with this problem of not cancelling this stoporders correctly.

Hope someone can help me out.

Thank you very much for your assistance.

Greetz Bjarne

Sent using the NexusFi mobile app


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
400 Million Barrels to Address Middle East Supply Disruption
Commodities
Energy Futures Shatter All-Time Daily Volume: 8.3 Millio …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
maryfromcolorado
Denver CO USA
 
Posts: 32 since Sep 2016
Thanks Given: 0
Thanks Received: 13

Is the problem with putting in the Stop Loss order, or canceling an order. It is possible that the spread between Bid and Ask is too high, and the stop loss calculated on a Long is a higher price than the open price.

I would have to see the code to comment further.

1. You can fix the stop loss to always be less than Ask.
2. Check the spread/stop loss and decide not to put the order in at that time.

Thanks,
Mary


Reply With Quote
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860



bjarne View Post
In backtesting and optimalisation no problems detected but I market replay an error is created and the strategy stops running.

What is the exact error message you get ?

In the past i have been struggling with overfills, which stops running the strategy


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 bjarne 
Breda NL
 
Experience: Beginner
Platform: NT
Trading: QM
Posts: 10 since Oct 2016
Thanks Given: 2
Thanks Received: 0

Ninja trader helped me out with the following answer:

I am pleased to share it with you.

In every one of your condition sets, "Do the following" -> Add -> Misc -> Set user defined variable -> Variable1 -> Value = 1
In every one of your condition sets, "When the following conditions are true" -> Add -> Left side : User Variables -> Variable1 -> Middle: != -> Right side : Misc -> Numeric Value -> Value = 1
Add a 6th condition set -> "Do the following" -> Add -> Misc -> Set user defined variable -> Variable1 -> 0

So no double entries of exits anymore

Thanks for the reactions


Started this thread Reply With Quote




Last Updated on October 31, 2016


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts