|
OHLC stands for the 4 elements displayed on a typical price bar:
• opening price; e.g 1.3019
• highest price; e.g 1.3403
• lowest price; e.g 1.2998
• closing price. e.g 1.3351
Look at the historical data.
You look at each bar and calculate the how many points are from the Open to the High (Long) and the Open to the Low(Short).
From that I look for the highest probable Take Profit (TP) and the highest probable Stop Loss (SL) for both the potential Long and Short positions
The starting point for the TP and SL calculations is 50 points with increments of 1 so the idea is to run a program to find the probability of the price reaching both the TP and SL if the probability is very high I am looking for the system to add a point to the starting point e.g 50+1 then 51+1. Then continue to add a point until the probability reaches a predefined point e.g. 0.75
So if I open a position I know I should have a 75% chance of either my TP or SL being hit or whatever I choose
Formula:
n = number of trials this is the number of bars i.e. days trading data
k = number of successes to see if the TP is hit by the Long
n – k = number of failures for the Long hitting the TP
p = probability of success in one trial for the Long
q = 1 – p = probability of failure in one trial for the Long
The formula above should be performed for both the Long and Short side and both the TP and SL
|