NexusFi: Find Your Edge


Home Menu

 





setstoploss_pt problems


Discussion in MultiCharts

Updated
    1. trending_up 1,839 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?
The 50/50 Paradox: Peace and Invasion Each at 20% -- Ira …
Prediction Markets & Event Contracts
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
Iran Peace Expired NO: Ceasefire on Life Support, OPEC a …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Ceasefire Collapse: Iran Fires 24 Missiles, Israel Hits …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
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