Need to calculate bias and key level in current timeframe

 

i see green doted and continuous bias and key level lines in my M1 another time frame charts. i notice that marker reverse when reaching these lines. so i think a Expert Advisor can automatically open trades on these levels. so can somebody give me code that calculates all bias and key levels in current time frame for exmaple last 1 hour in M1 chart, and so on. may be a variable defines what period in minutes to use.

or is there already functions in MQL4 that do the job

also can some body give me code for calculating the current support and resistance levels or is there any function in MQL4 already for this as well.

Shahzad

 
Support and Resistance level are SUBJECTIVE from trader to trader. That include Pivot Points and Trend Lines. You'll need to define better what you mean by "green doted and continuous bias and key level lines" if you want someone to help you on this forum. Example: are you using some kind of Indicator?
 

my boss showed me these bias and key levels and wants me to write the EA. then somebody installed some script on my computer i had these lines i know these are bias and key levels. because i saw object list and saw object with these names like bias_1.2343 some thing like this. i think i can get the object list in code and find the nearest bias or key level but i think it will not work because the object list contains a lot of such object and i may miss the correct one.

any way tell me some thing about support and resistance levels and how to calculate them

Shahzad

 

http://news.forexdistrict.com/wp-content/uploads/2009/09/211.jpg have a look on this image

shahzad

 

Well, if I wasn't so hard headed trying to code a technical EA, I would be a Support and Resistance trader. That said take a look at this picture.

One can draw a support and resistance from any point A to point B. There's No right or wrong way to calculate them. If someone installed a script which points out support and resistance levels for your boss then the objects it creates are what your boss considers support and resistance and bias.

 

So yeah, you'll need to start searching for the most recent Objects on the charts and make that price the target of your EA. Sorry, I haven't been working with Objects as they slow down my back-tests. The book and documentation would be a nice place to start. If I were you, I wouldn't expect anyone to give me a universal definition for support/resistance or bias. Hence, that's why they're called bias.

 

Edit: yeah, I just seen your second post. Those look like Pivot Point support and resistance. With that the Key thing is to Define the Timeframe for your Pivots. You'll want to look at the script or indicator provided to you to determine if it uses London Open or New York Open for Day Open. Those are the popular ones and Daily Pivots are the Popular Pivots. Some uses Hourly Pivots and So on. You already have the levels provided in a Script now the question is "How does your boss want you to trade it?" 

 

whops i think i am mixing the concepts Support and resistance levels, Bias and Keys levels, pivot points. give me some explanations and how the relate to each other. at this point i know very well about support and resistance levels and pivot point formulas but not how they relate to each other. bias and key level no idea.

and if u say that pivot points and support and resistance levels are related then i have question. as my readings pivot points are formula driven and project the support and resistance levels in future. but actual support and resistance levels can be defined on price action once we have gone through the future. that means pivot points predict the future support and resistance levels ? (i think i am 80% correct or make me correct). then what the hell is bias and key levels.

my boss plan is we program the EA around pivot points(future support and resistance levels). go in short if price move just above resistance level, go in long if price move just below support. go in short if price move above resistance 1, go in another short when price move above second resistance and hope that both shorts will recover in future because support and resistance dictate that price will go down eventually. same procedure with hitting 2 supports. he is very very hopeful it will work. (i know there is one big flaw in this plan because his rules says go long if price going down support and you already have multiple short orders running, sounds like disaster)

shahzad

 

shahzad73: ...and if u say that pivot points and support and resistance levels are related then i have question. as my readings pivot points are formula driven and project the support and resistance levels in future. but actual support and resistance levels can be defined on price action once we have gone through the future. that means pivot points predict the future support and resistance levels ? (i think i am 80% correct or make me correct). then what the hell is bias and key levels...

 

I'm not an expert on anything. However, the way I understand it, Pivot Points and Support and Resistance Levels are Not directly related. Pivot Points are a type of support and resistance level. So too are trend lines. In my opinions, Pivot Points are artificially created levels. Seems it was popular in the stock markets and therefore when some of those traders made their way to Forex they brought along their dear friend the Pivots. With Any support and resistance level, its only valid to those who recognize it as a Support or Resistance. Pivots plays into the Psychological form of trading called Crowd effect. "Everybody sees it so therefore it must be true". When I ran my back-tests on them, they didn't start being profitable until about 3 years ago. And once the market Stop recognizing them, too many people trading or some huge player exploiting them, pivot points would go away or become marginal.

 

Like I said earlier Support and Resistance levels are Subjective. If they're really Support and Resistance levels, how come price doesn't bounce from ceiling to floor all year long between them? I cannot tell your company how to trade Pivots however the key to understanding them is knowing that they are a point of activity. The other stuff like Bias and Key Levels, I don't have any idea how they are defined in Forex trading. They could just mean Bias = Subjective and Key Level = Point of Activity. All this is just my Opinions.

 

ok got the idea. thanks let some body explain the bias and key levels or may be i will open another thread



shahzad

Reason: