Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Wizard for creating a strategy; exit and stoploss interference
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.
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.
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