How to plot simply at ApplyStop

ApplyStop( stopTypeLoss , stopModePercent , 0, True , False , 0, 0, -1, 10 );

I need very simple: plot a arrowUp/Down at ApplyStop point,
(I search google seem only found Plot with Trailing Stop, or something too complex for this simple task)
Thank you!

1 Like

thank you, it's ok now
But it's not simple any more :slight_smile:

I done with this code:

Equity( 1, 0 ); // it's required
InTrade = Flip( Buy, Sell );
//nSl =  percent stop lost
//ml: is my macd line
stopline = IIf( InTrade, ml * ( 1 - 0.01 * nSl ), Null );
Plot( stopline, "Max stop line", colorBlack, styleThick );


@dungla2011 I don't understand your post but if you are looking for proper information on plotting stop loss lines you should review official sources in the user guide and this one in the Official Knowledge Base (scroll down to the second code example)

Users like myself try to post solutions (like the one referred to in the earlier post) but many of those (my) codes have flaws, so when possible look for confirmation and remember to test any codes you find from random dudes on the internet.

Also if you have a problem with your code you need to post the entire code (using code tags properly) if you want forum users to try to help you.

Good luck!


  1. first your code has 0% stop amount. As such it can't work. You need to specify stop amount that is greater than 0%.
  2. stops in PORTFOLIO case are not "simple" because you have to know the entry point and entry point depends on portfolio level state (such as if you have cash to open this particular position or if you hit max open stop limit, what other symbols are doing (and their position score)

Equity(1) can be used to evaluate stops BUT this works in single-symbol case (when no portfolio constraints apply). Appropriate code is in the Users' Guide (scroll down to "Comments" section): and in the Knowledge Base

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.