Binary Option Strategy Tester with Martingale-Basic V.2In Binary options, strategy testing is a bit different. The strategy result depends upon expiry intervals and payout ratio.
My previous script was a try to resolve this but has some bugs in specific choices. The new version overcame those and added some new features useful for binary option strategy testing.
Assumption:
We are opening position at next candle after signal come
Chart interval is option expiry time.
We are taking the position at opening price
Our call will be profitable if we get a green candle and put will be profitable if we get a red candle
We can open only one trade at a time. So if we are in trade, subsequent signals will be ignored.
All Input Options:
Test Call/Put individually or both. Default BOTH
Select up to 5 Martingale levels. Default 2
Type of Martingale Trade. Default “SAME”
“SAME”: If you are trading CALL and incur a loss, you are taking CALL in subsequent Martingale levels.
“OPSITE”: if you are trading CALL and incur a loss, you are taking PUT in subsequent Martingale levels.
“FOLLOW CANDLE COLOR”: You are following candle color in Martingale levels, i.e if the loss candle is RED, you are taking PUT in subsequent candles.
“OPPOSITE CANDLE COLOR”: You are taking opposite candle color trade, i.e if the loss candle is RED, you are taking CALL in subsequent candle.
Select Specific Trading Session. Please select “USE SPECIFIC SESSION”. Default: TRUE
Put the investment amount per option. Default: 10
Payout ratio. Default: 80%
The strategy is taken from Vdub Binary Options SniperVX v1 (by @vdubus). I have deleted extra parts and kept only the necessary parts.
Result Table
Signal and Win Levels:
Signal and Loss:
Please note that Binary options trading is very risky. You must be aware of the risk and be willing to accept them in order to invest in binary options. Only invest what you can afford to lose. The past performance of any trading system, strategy, or methodology is not necessarily indicative of future results.
Binaryoptionstrategies
Binary Option Strategy Tester with MartingaleIn Binary options, strategy testing is a bit different. The script is just a try to test Binary options strategies.
Assumption:
We are opening position at next candle after signal come
We are taking the position at opening price
Our call will be profitable if we get a green candle and put will be profitable if we get a red candle
We can open only one trade at a time. So if we are in trade, subsequent signals will be ignored.
The script is not counting your profit or loss, it just counting the winning and losing trades.
Input Options:
Choose long only or short only test. Default is both.
You can continue your trade with Martingale Level, up to 5. Default is 1 (no Martingale)
You can choose Martingale trade type
SAME: if call subsequent trade will be call only and vice versa
OPPOSITE: if call subsequent trade will be put
FOLLOW CANDLE COLOR: Subsequent trade will follow previous candle color
OPPOSITE CANDLE COLOR: Subsequent trade will opposite of previous candle color
You can choose trading session to test. Default is false.
The strategy is taken from Vdub Binary Options SniperVX v1 (by @vdubus) . I have deleted extra parts and kept only the necessary part.
Without Martingale
Result Table
With Martingale
I am very new to Pine script, so waiting for your comments and review.
Rainbow Gator - EMAs strategy for Binary OptionThis is an EMAs indicator for Binary Option or Scalping Alert designed for lower Time Frame Trend (2-5minutes).
Although you will find it a useful tool for higher time frames as well.
The Alerts are generated when the fast EMA cross over/under other slower EMAs, you then have the chance to wait for the pullback during the new trend then enter for trend momentum (follow the trend).
Beware when the trend is close to EMA200.
You must draw your SRT (Support-Resistance-Trendline) before looking for setups.
Good luck.
Black-Scholes Options Pricing ModelThis is an updated version of my "Black-Scholes Model and Greeks for European Options" indicator, that i previously published. I decided to make this updated version open-source, so people can tweak and improve it.
The Black-Scholes model is a mathematical model used for pricing options. From this model you can derive the theoretical fair value of an options contract. Additionally, you can derive various risk parameters called Greeks. This indicator includes three types of data: Theoretical Option Price (blue), the Greeks (green), and implied volatility (red); their values are presented in that order.
1) Theoretical Option Price:
This first value gives only the theoretical fair value of an option with a given strike based on the Black-Scholes framework. Remember this is a model and does not reflect actual option prices, just the theoretical price based on the Black-Scholes model and its parameters and assumptions.
2)Greeks (all of the Greeks included in this indicator are listed below):
a)Delta is the rate of change of the theoretical option price with respect to the change in the underlying's price. This can also be used to approximate the probability of your option expiring in the money. For example, if you have an option with a delta of 0.62, then it has about a 62% chance of expiring in-the-money. This number runs from 0 to 1 for Calls, and 0 to -1 for Puts.
b)Gamma is the rate of change of delta with respect to the change in the underlying's price.
c)Theta, aka "time decay", is the rate of change in the theoretical option price with respect to the change in time. Theta tells you how much an option will lose its value day by day.
d) Vega is the rate of change in the theoretical option price with respect to change in implied volatility .
e)Rho is the rate of change in the theoretical option price with respect to change in the risk-free rate. Rho is rarely used because it is the parameter that options are least effected by, it is more useful for longer term options, like LEAPs.
f)Vanna is the sensitivity of delta to changes in implied volatility . Vanna is useful for checking the effectiveness of delta-hedged and vega-hedged portfolios.
g)Charm, aka "delta decay", is the instantaneous rate of change of delta over time. Charm is useful for monitoring delta-hedged positions.
h)Vomma measures the sensitivity of vega to changes in implied volatility .
i)Veta measures the rate of change in vega with respect to time.
j)Vera measures the rate of change of rho with respect to implied volatility .
k)Speed measures the rate of change in gamma with respect to changes in the underlying's price. Speed can be used when evaluating delta-hedged and gamma hedged portfolios.
l)Zomma measures the rate of change in gamma with respect to changes in implied volatility . Zomma can be used to evaluate the effectiveness of a gamma-hedged portfolio.
m)Color, aka "gamma decay", measures the rate of change of gamma over time. This can also be used to evaluate the effectiveness of a gamma-hedged portfolio.
n)Ultima measures the rate of change in vomma with respect to implied volatility .
o)Probability of Touch, is not a Greek, but a metric that I included, which tells you the probability of price touching your strike price before expiry.
3) Implied Volatility:
This is the market's forecast of future volatility . Implied volatility is directionless, it cannot be used to forecast future direction. All it tells you is the forecast for future volatility.
How to use this indicator:
1st. Input the strike price of your option. If you input a strike that is more than 3 standard deviations away from the current price, the model will return a value of n/a.
2nd. Input the current risk-free rate.(Including this is optional, because the risk-free rate is so small, you can just leave this number at zero.)
3rd. Input the time until expiry. You can enter this in terms of days, hours, and minutes.
4th.Input the chart time frame you are using in terms of minutes. For example if you're using the 1min time frame input 1, 4 hr time frame input 480, daily time frame input 1440, etc.
5th. Pick what style of option you want data for, European Vanilla or Binary.
6th. Pick what type of option you want data for, Long Call or Long Put.
7th . Finally, pick which Greek you want displayed from the drop-down list.
*Remember the Option price presented, and the Greeks presented, are theoretical in nature, and not based upon actual option prices. Also, remember the Black-Scholes model is just a model based upon various parameters, it is not an actual representation of reality, only a theoretical one.
*Note 1. If you choose binary, only data for Long Binary Calls will be presented. All of the Greeks for Long Binary Calls are available, except for rho and vera because they are negligible.
*Note 2. Unlike vanilla european options, the delta of a binary option cannot be used to approximate the probability of the option expiring in-the-money. For binary options, if you want to approximate the probability of the binary option expiring in-the-money, use the price. The price of a binary option can be used to approximate its probability of expiring in-the-money. So if a binary option has a price of $40, then it has approximately a 40% chance of expiring in-the-money.
*Note 3. As time goes on you will have to update the expiry, this model does not do that automatically. So for example, if you originally have an option with 30 days to expiry, tomorrow you would have to manually update that to 29 days, then the next day manually update the expiry to 28, and so on and so forth.
There are various formulas that you can use to calculate the Greeks. I specifically chose the formulations included in this indicator because the Greeks that it presents are the closest to actual options data. I compared the Greeks given by this indicator to brokerage option data on a variety of asset classes from equity index future options to FX options and more. Because the indicator does not use actual option prices, its Greeks do not match the brokerage data exactly, but are close enough.
I may try to make future updates that include data for Long Binary Puts, American Options, Asian Options, etc.
BO - RSI - M5 BacktestingBO - RSI - M5 Backtesting -Rule of Strategy
A. Data
1. Chart M5 IDC
2. Symbol: EURJPY
B. Indicator
1. RSI
2. Length: 12 (adjustable)
3. Extreme Top: 75 (adjustable)
4. Extreme Bottom: 25 (adjustable)
C. Rule of Signal
1. Put Signal
* Rsi create a temporary peak over Extreme Top
row61: peak_rsi= rsi >rsi and rsi >rsi and rsi rsi_top
2. Call Signal
* Rsi create a temporary bottom under Extreme Bottom
row62: bott_rsi= rsi rsi and rsi <rsi_bot
D. Rule of Order
1. Only 1 trade opening
2. Stoploss: No trade open after 1 loss trade each day (number of loss trades adjustable)
3. Expiry: after 6 bars (number of bars adjustable)
BO - Bar's direction Signal - BacktestingBO - Bar's direction Signal - Backtesting Options:
A. Factors Calculate probability of x bars same direction
1. Periods Counting: Data to count From day/month/year To day/month/year
2. Trading Time: only cases occurred in trading time were counted.
B. Timezone
1. Trading time depend on Time zone and specified chart.
2. Enable Highlight Trading Time to check your period time is correct
C. Date Backtesting
* Only cases occurred in Date Backtesting were reported.
D. Setup Options & Rule
1. Reversal after 2 bars same direction
* Probability of 3 bars same direction < 50
* 2 bars same direction is start of series
2. Reversal after 3 bars same direction
* Probability of 4 bars same direction < 50
* 3 bars same direction is start of series
3. Reversal after 4 bars same direction
* Probability of 4 bars same direction < 50
* 3 bars same direction is start of series
4. Reversal after 5 bars same direction
* Probability of 5 bars same direction < 50
* 4 bars same direction is start of series
5. Reversal after 6 bars same direction
* Probability of 6 bars same direction < 50
* 5 bars same direction is start of series
Binary Options TrendOnly for trading binary options.
Use 5 sec candles in your options trading software (IQ Option, Expert Option etc.)
Win more than 60% of trades.
Recommended Timeframe : 1 min
Long : When the color is darker green
Short : When the color is darker red
Reviews and Suggestions are welcome.
Feedback Appreciated.
Thank you.