TradingView
Kaspricci
4 Nov 2022 pukul 12.06

50 Pips A Day Strategy - Kaspricci 

Euro Fx/U.S. DollarFXCM

Deskripsi

50 Pips A Day Strategy

This strategy is designed to work on 1 hour timeframe. It is designed to capture the early market move of major forex pairs like EURUSD or GBPUSD. It takes the high and low of the first candle (7 a.m. GMT, London Stock Exchange opens) and places to pending orders at these prices levels.

  • High + additional gap in pips = buy stop pending order
  • Low + additional gap in pips = sell stop pending order


For both orders a stop loss of 15 pips and a take profit of 50 pips is used as a default. As soon as price triggers one pending order, the remaining pending order is cancelled. At the end of the configured session time all open and pending orders are closed / cancelled.

Settings
  • Trading Time - start and end time of session. It is configured for Monday to Friday only. At the beginning the first candle is used to define stop prices for pending orders.
  • Source for Buy Stop order - Default: high. Used to calculate buy stop order. You can add additional pips as a gap.
  • Source for Sell Stop order - Default: low. Used to calculate sell stop order. You can add additional pips as a gap.
  • Stop Loss in Pips - Default: 15. Used for both pending orders.
  • Take Profit in Pips - Default: 50. Used for both pending orders.


This strategy is for educational purposes only! It is not meant to be a financial recommendation.

Catatan Rilis

Adding two features:
  • you can now select between two stop loss / take profit calculation methods. 1) fix values as before or 2) dynamic calculation based on Average True Range and multipliers for stop loss and take profit.
  • with dynamic stop loss your risk amount is changing too. I added an option to overwrite quantity and adjust it to meet a defined risk percent of equity (keep in mind that equity is changing with each closed trade. So also the total risk amount is changing.)

Catatan Rilis

Adding custom alert messages that align with davidd.tech strategies enabling simple bot configurations.

Supported list of variables:

  • #nl# => New line
  • #symbol# => The ticker e.g. EURUSD
  • #LongSL# => Long Stop loss, absolut price of stop loss (buy stop price - stop loss in ticks)
  • #LongTP1# => Long Take Profit 1, absolut price of take profit target at 50% of take profit (buy stop price + take profit in ticks * 0.5)
  • #LongTP2# => Long Take Profit 2, absolut price of take profit target at 100% of take profit (buy stop price + take profit in ticks)
  • #LongTPFULL# => Long Take Profit in FULL, same as #LongTP2#
  • #ShortSL# => Short Stop loss, absolut price of stop loss (sell stop price + stop loss in ticks)
  • #ShortTP1# => Short Take Profit 1, absolut price of take profit target at 50% of take profit (sell stop price - take profit in ticks * 0.5)
  • #ShortTP2# => Short Take Profit 2, absolut price of take profit target at 100% of take profit (sell stop price - take profit in ticks)
  • #ShortTPFULL# => Short Take Profit in FULL, same as #ShortTP2#
  • #TakeAmount1# => Percent to remove from trade on hitting TP1, eg. 1.0 (risk in percent * 0.5)
  • #TakeAmount2# => Percent to remove from trade on hitting TP2, eg. 2.0 (risk in percent)
  • #TakeAmountFULL# => Percent to remove from trade on hitting TP3, same as #TakeAmount2#


Please test the alerts carefully as I don't use them by my own! Leave a comment, in case you found a bug.

Catatan Rilis

Fixed a bug with too many pending orders created, when enabling the strategy feature "on every tick".

Catatan Rilis

I made several changes to the script.

  • You can now define the time druing which the high and low are determined. Before it took always the first high and low of the first candle of the trading session. This way now you can use the script also on lower timeframes (<= 1h).
  • You can now disable the cancellation of the second pending offer.
  • Wehn enabling the risk based quantity calculation you can choose whether your risk amount is based on intitial capital (always the same) or on current balance (takes net profit of closed trades into account)
  • You can now disable the lot size based calculation of quantity, when risk based percentage is enabled.
  • I fixed a wrong quantity calculation, when using the script for non forex symbols.
Komentar
banjo97
Works well on GBPJPY
Kaspricci
@banjo97, thanks for the feedback!
Mikejasz
is there any way to make this work in 5 minute parameters instead of the 15?
mezameza
Hi @Kaspricci
Are you able to modify the code to allow for orders to be set at the start of the 8 am, 9 am or 10 am candle (as an option) based on the high (or low) of the 7 am or 8 am candle (depending which one is the highest (or lowest). That is, I would like the high or low to be determined based on 7 am and 8 am candles (not just 7 am candle) and have an option to set the entry at 8 am, 9 am or 10 am.
Kaspricci
@mezameza, Hi, sorry for late answer. Just saw your comment now. I am not sure whether I understand your idea correctly. Can you please explore a bit more. What shall I check at 7am and under which conditions the script shall wait until 8am or 9am or 10am before placing a pending order?
mezameza
@Kaspricci, Hi, so to determine the high/low we look at 7am and 8am candles. If, for example, the high of the 8 am candle is higher than the high of the 7 am candle, we use the high of the 8 am candle. if, for example, the low of the 7am candle is lower than the low of the 8am candle, we use the low of the 7am candle.
Once the High and Low are determined based on the above, we then set a stop buy and a stop sell orders at the start of the 9am candle (option 1) or 10am candle (option 2).
Kaspricci
@mezameza, I have send you a private message. And I think the script is not working properly. Will fix it.
Lebih lanjut