NexusFi: Find Your Edge


Home Menu

 





setstoploss_pt problems


Discussion in MultiCharts

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




 
Search this Thread
  #1 (permalink)
eros1973ms
florence
 
Posts: 27 since Oct 2011
Thanks Given: 3
Thanks Received: 6

Hi all,

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


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
No book, only a stair: journaling fills where price move …
Cryptocurrency
EA
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
Datafeed for Atas
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
BERN ALGOS algo trading journal
3 thanks
NexusFi site changelog and issues/problem reporting
2 thanks
TopStep Trader disappointment
2 thanks
Want your NinjaTrader indicator created, free?
1 thanks
Running trading strategies on a VPS
1 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

eros1973ms,

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.

Regards,

ABCTG


Follow me on X Reply With Quote
  #3 (permalink)
eros1973ms
florence
 
Posts: 27 since Oct 2011
Thanks Given: 3
Thanks Received: 6



ABCTG View Post
eros1973ms,

what does "it does not work" mean? What is it doing versus and what are you expecting?

Regards,

ABCTG

actually it does not trigger...and I cannot understand where the stop is!


Reply With Quote
  #4 (permalink)
eros1973ms
florence
 
Posts: 27 since Oct 2011
Thanks Given: 3
Thanks Received: 6


ABCTG View Post
eros1973ms,

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.

Regards,

ABCTG

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?


Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

eros1973ms,

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.

Regards,

ABCTG


Follow me on X Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

eros1973ms,

SetStopLoss would not be tied a specific entry anyway, it would act as one stop for all your entries.

Take a look at the "from Entry" reserved word in the wiki or MC help file for examples of how to tie exits to specific entries.

Regards,

ABCTG


eros1973ms View Post
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?


Follow me on X Reply With Quote
  #7 (permalink)
eros1973ms
florence
 
Posts: 27 since Oct 2011
Thanks Given: 3
Thanks Received: 6


ABCTG View Post
eros1973ms,

SetStopLoss would not be tied a specific entry anyway, it would act as one stop for all your entries.

Take a look at the "from Entry" reserved word in the wiki or MC help file for examples of how to tie exits to specific entries.

Regards,

ABCTG

"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?


Reply With Quote
  #8 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

eros1973ms,

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.

Regards,

ABCTG


Follow me on X Reply With Quote




Last Updated on July 18, 2018


© 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