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)
I am having problems with setstoploss_pt (precedeed by setstopposition).
it seems that if you put like setstoploss_pt(100) on eurusd (where ticksize is 0.00001), it correctly gets 10 pips.
But if I want to enter a trade at high of a bar and use the low as stop loss I tried with:
setstopposition;
setstoploss_pt((h-l)/ticksize);
it does not work...
any idea?
thanks
Can you help answer these questions from other members on NexusFi?
what does "it does not work" mean? What is it doing versus and what are you expecting?
As "H-L" can change while you are in a position it might be best to simply code your exit order yourself instead of using the build in SetStopLoss reserved words.
I see what you mean...but in this case I don't know how to correctly set it as I can have multiple positions open, each with a different SL. is there a way to set a stop order conditioned to an existing specific order?
I would suggest using the print reserved word to check what (h-l)/ticksize evaluates to for every bar.
This should tell you why the stop was not triggered.
"from entry" looks very good, thanks!
I understand that I can do this only if the entry label for the different trades is different (which is one of my cases).
But I also have a case where the same signal can generate different positions, but all with the same label...
I this case no way to differentiate?
it might be simpler to name the entries differently, even when they are caused by the same conditions (for example with a counter). I would still suggest testing both approaches to see if you get the results you want.