Results 1 to 8 of 8

Thread: An effective stoploss egy?

  1. #1
    I am exploring stoploss egies to get an EA in development and wonder if anybody has come across a very good one.

    I discovered the attached egy on a different forum also, despite the fact that I programmed for a living for more than 4 decades, I have been not able to simplify it to make it run faster (it's REALLY slow because of the way it's coded and makes backtesting impossible ). It does, however, create excellent stops.

    Maybe this post belongs in the MT4 forum - if so, please forgive me Mr. Moderator, but I am also open to hearing regarding stoploss approaches that work well but may not have been coded for MT4.


    All help appreciated...

    https://forexintuitive.com/attachmen...7292443643.mq4

  2. #2
    Lou,

    I've discovered ATR the best for stops but another gey I remember reading about somewhere and have employed it's the low or high 3 candles back. Inside bars do not count. Could be interesting to see it coded.

  3. #3
    I would concur with Markj.

    I exchange daily charts and has been using the preceding hi/lo for a stop. Works stuffs you when taking place.

    Now I am using 70 percent of a 20 period ATR. I fix the stop as the transaction goes in my favour. If the transaction is going against me I leave the stop where it is.

    I've noticed that generally when the price goes against you and exceeds 70 percent of the ATR it is usually game over and you are taking a look at a reversal anyhow.

  4. #4
    Thanks Mark and WillF (sp) - I am currently using an ATR-based stop that is loosely based on the indior I posted (which is also ATR-based). I haven't tried coding the old dependable n candles straight back (3, usually) but it should be simple to code.

  5. #5
    Quote Originally Posted by ;
    I'd agree with Markj.

    I exchange of daily charts and was using the preceding hi/lo for a stop. When ranging, works stuffs you.

    I am using 70% of a 20 interval ATR. I adjust the stop, as the trade goes in my favour. If the trade is going against me I leave the stop where it's.

    I have noticed that generally when the price goes against you personally and exceeds 70% of the ATR it's usually game over and you're taking a look at a reversal anyway.
    Hi Marj,

    Sorry for being newbie.

    Can I ask how to utilize ATR, I can not seem to see the
    terms of 70% to the ATR indior?

    Is 70% can be put on the Minimum and Maximum Parameter?
    Or can it be about the Level line.

    Really don't know, Please Help?

    Thanks,

  6. #6
    Quote Originally Posted by ;
    Lou,

    I've discovered ATR the most appropriate for stops but another gey I remember reading about somewhere and have employed it is the high or low 3 candles back. Bars do not count though. May be interesting to see it coded.
    I use and like this 3 candles (bars) Trailing Stop code. I use it in an EA in which it is triggered when receptive order is X pips in profit. Maybe someone can code it to get an indior.
    Inserted Code extern int GapTS = 20; double LongTS, ShortTS; int c, n, p; c=0; p=0; for(n=0;nlt;=6;n ) if(High#91;c 1Number 93;lt;High#91;c 2#93; Low#91;c 1#93;gt;Low#91;c 2#93;-RRB- n--; c ; p ; if(n==3) break; ShortTS=NormalizeDouble(High#91;iHighest(Symbol(), 0,MODE_HIGH,p,1)#93;,Digits); LongTS=NormalizeDouble(Low#91;iLowest(Symbol(),0,M ODE_LOW,p,1)#93;,Digits);
    In an EA, just use the LongTS or ShorTS to place Stoploss worth in OrderModify() call.

    Inserted Code if(OrderClosePrice()-OrderOpenPrice() gt; GapTS*Point) OrderModify(OrderTicket(),OrderOpenPrice(),LongTS, OrderTakeProfit(),0,GreenYellow); if(OrderOpenPrice()-OrderClosePrice() gt; GapTS*Point) OrderModify(OrderTicket(),OrderOpenPrice(),ShortTS ,OrderTakeProfit(),0,Red);
    Wackena

  7. #7
    Quote Originally Posted by ;
    Hi Marj,

    Except for being newbie.

    May I ask how to utilize ATR, I can not seem to see the
    relation of 70% into the ATR indior?

    Is 70% could be set on the Minimum and Maximum Parameter?
    Or is it about the Level line.

    Really don't know, Please Assist?

    Thank you,

    Renefx
    Neither. Just spend the figure that ATR offer you and utilize 70% of it.

    E.G. ATR(20) on GBPUSD is 0.0120. Just take the last 3 numbers. Hence that the stop would be 120-30percent =84.

  8. #8

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information