Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

ComeBacker Trading - script for MetaTrader 5

Views:
6261
Rating:
(13)
Published:
2020.07.06 20:25
Updated:
2020.08.10 08:12
ComeBacker.mq5 (3.59 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Description

  • in an assumption that prices have a tendency to visit previous highs/lows frequently in short-term, this script determines the highest and the lowest prices for last x bars, if highest is the last it opens buy order otherwise it opens sell order.
  • default take-profit is highest for buy order, lowest for sell order. it can be expanded or shrinked by modifying additional profit input parameter. positive values for expansion, negative values for shrinking. be aware of limits.
  • default stop-loss is determined by profit/loss ratio input parameter. take-profit range divided by this ratio gives stop-loss. 2 means half of take-profit range, thus 2:1 profit/loss ratio.


Input Parameters

  • Bar Count: number of past bars to evaluate highest and lowest prices. highest/lowest price in past 20 bars.
  • Profit/Loss Ratio: stop-loss is calculated by dividing take-profit in pips by PL ratio. 2 means half of take-profit.
  • Additional Profit: expand or shrink take-profit other than highest/lowest by offseting.
  • Lots: lots.


Warning

    • script won't work correctly if you enter inputs out of limits.
    • script won't work correctly if current price is highest or lowest of past bars.


    Modify SL and/or TP Modify SL and/or TP

    I used to suffer from unnecessary losses and/or cutting my profit short since I wasn't fast enough to modify my SL and/or TP. That is why I've wrote these scripts that will allow me to react fast when I must modify my Sl and/or TP especially when I have many open and/or pending trades. I know there are plenty of Metatraders who also suffer from this and that is why I would like to share these scripts with you, hopefully it will be beneficial. Do not forget to send you comments as well as rate these scripts. Happy trading!

    Programming patterns - Facade Programming patterns - Facade

    Provide a unified interface to a set of interfaces in a subsystem.

    Design patterns - Twin Design patterns - Twin

    Modeling multiple inheritance with the Twin pattern.

    Identify potential entries Identify potential entries

    I want to share with you this story. When I started trading, I learnt the scalping strategy in a volatile market. I really loved scalping especially when I see the price is moving fast. However, scalping for a long period of time is exhausting to me especially in a volatile market; volatile market requires fast analysis, actions and reactions; that is why I always reach a point that I loss concentration, focus and I start making those really stupid mistakes. That is why I created this indicator that helped me to automatically identify these potential entries (based on the formation of candlesticks) instead of doing all the work myself. I know there are plenty of Metatraders who also suffer from this and that is why I would like to share this indicator with you, hopefully it will be beneficial. Do not forget to send you comments as well as rate these scripts. Happy trading!