Rumman Chowdhury
New Member
- Credits
- 0
TBS Trading EA : Ping Pingah
Please note, the logic defined for this system is not my own work. Search online for "TBS Strategy" and the relevant links will appear.
Please find below an EA for MT4, based upon the metrics outlined in this thread.
Place the "WelchBBWidth.ex4" under your terminals "Indicators" folder, and the "Ping Pingah v1.01.ex4" under the "Experts" folder.
EA Inputs:
Position Size Method:
- Fixed
- Will use the input "Lot size (Fixed)" as the trading lot size
- Dynamic Balance Risk
- Will auto-calculate lot size, based on the risk defined for "Balance Risk % (Dynamic)"
- If SL is well defined, will calculate risk according to SL. If no SL defined, pre-defined ATR metric used to calculate risk.
Use Martingale:
- If true, for every loss trade, the initial lot size will increase by a multiplier "Martingale Lot Multiplier" for every new trade, until a profitable trade closes.
- This will be cycled, for a maximum of "Max. Consecutive MG Apps" times
TP Method:
- TP1
- Exit on BB mid-line touch
- TP2
- Exit on opposite BB band touch
Breakeven (Pips) :
- After this amount of pips, in your favour, the SL for the trade will be set at the trade opening price +"Breakeven Open Delta (Pips)" in your favour.
Use Trailing SL:
- Set to true:
- If "Use ATR Trailing SL":
-Set to true:
- The trail for the SL will be defined by the "ATR T.SL Multiplier" and the "ATR Period"
- Set to false:
- The trail for the SL will be defined by the "Fixed T.SL Trail (Pips)"
- If "Instantly Trail SL":
- Set to true:
- The trail will initiate as soon as possible
- Set to false:
- The trail will wait until the open price has been exceeded, and then trail
Max. Spread (Points):
- The maximum permitted spread (in points) for a trade to enter.
Max. Slippage (Points):
- The maximum permitted slippage (in points) for a trade to enter.
- Not very necessary to change this default value.
Use ATR Daily Filter:
- If set to true, will evaluate current day's trading range, vs daily trading range for "ATR Daily Av. Period" days.
- If current day's range + TP target is less than the average trading range, trade is permitted
- If no TP set, TP target replaced with SL delta for above calculation
Safe Entry:
- False
- STO evaluation for current candle
- BB evaluation for previous candle
- Width evaluation for previous candle
- True
- All of the above, plus:
- STO evaluation for previous candle
- BB evaluation for current candle
- Width evaluation for current candle
WelchBBWidth Colour:
- Permit trading on set colour of WelchBB
SL Deviation Band Delta:
- Given the defined BB deviation, set the trade SL to the BB band value for (deviation+input value)
- Note: SL band modifier will have a minimum value of 1. So. if using a 2 deviation for BB, and this input is unset, the SL will be set at the BB 3 deviation value.
Happy testing and trading
Please note, the logic defined for this system is not my own work. Search online for "TBS Strategy" and the relevant links will appear.
Please find below an EA for MT4, based upon the metrics outlined in this thread.
Place the "WelchBBWidth.ex4" under your terminals "Indicators" folder, and the "Ping Pingah v1.01.ex4" under the "Experts" folder.
EA Inputs:
Position Size Method:
- Fixed
- Will use the input "Lot size (Fixed)" as the trading lot size
- Dynamic Balance Risk
- Will auto-calculate lot size, based on the risk defined for "Balance Risk % (Dynamic)"
- If SL is well defined, will calculate risk according to SL. If no SL defined, pre-defined ATR metric used to calculate risk.
Use Martingale:
- If true, for every loss trade, the initial lot size will increase by a multiplier "Martingale Lot Multiplier" for every new trade, until a profitable trade closes.
- This will be cycled, for a maximum of "Max. Consecutive MG Apps" times
TP Method:
- TP1
- Exit on BB mid-line touch
- TP2
- Exit on opposite BB band touch
Breakeven (Pips) :
- After this amount of pips, in your favour, the SL for the trade will be set at the trade opening price +"Breakeven Open Delta (Pips)" in your favour.
Use Trailing SL:
- Set to true:
- If "Use ATR Trailing SL":
-Set to true:
- The trail for the SL will be defined by the "ATR T.SL Multiplier" and the "ATR Period"
- Set to false:
- The trail for the SL will be defined by the "Fixed T.SL Trail (Pips)"
- If "Instantly Trail SL":
- Set to true:
- The trail will initiate as soon as possible
- Set to false:
- The trail will wait until the open price has been exceeded, and then trail
Max. Spread (Points):
- The maximum permitted spread (in points) for a trade to enter.
Max. Slippage (Points):
- The maximum permitted slippage (in points) for a trade to enter.
- Not very necessary to change this default value.
Use ATR Daily Filter:
- If set to true, will evaluate current day's trading range, vs daily trading range for "ATR Daily Av. Period" days.
- If current day's range + TP target is less than the average trading range, trade is permitted
- If no TP set, TP target replaced with SL delta for above calculation
Safe Entry:
- False
- STO evaluation for current candle
- BB evaluation for previous candle
- Width evaluation for previous candle
- True
- All of the above, plus:
- STO evaluation for previous candle
- BB evaluation for current candle
- Width evaluation for current candle
WelchBBWidth Colour:
- Permit trading on set colour of WelchBB
SL Deviation Band Delta:
- Given the defined BB deviation, set the trade SL to the BB band value for (deviation+input value)
- Note: SL band modifier will have a minimum value of 1. So. if using a 2 deviation for BB, and this input is unset, the SL will be set at the BB 3 deviation value.
Happy testing and trading
