How to code? - page 177

 

Could you explane more exactly your issues? It's my script and I use it without problems.

 
 
raja_ar_radu:
The Klinger Oscillator (KO) was developed by Stephen J. Klinger. Learning from prior research on volume by such well-known technicians as Joseph Granville, Larry Williams, and Marc Chaikin, Mr. Klinger set out to develop a volume-based indicator to help in both short- and long-term analysis.

The KO was developed with two seemingly opposite goals in mind: to be sensitive enough to signal short-term tops and bottoms, yet accurate enough to reflect the long-term flow of money into and out of a security.

The KO is based on the following tenets:

* Price range (i.e. High - Low) is a measure of movement and volume is the force behind the movement. The sum of High + Low + Close defines a trend. Accumulation occurs when today's sum is greater than the previous day's. Conversely, distribution occurs when today's sum is less than the previous day's. When the sums are equal, the existing trend is maintained.

* Volume produces continuous intra-day changes in price reflecting buying and selling pressure. The KO quantifies the difference between the number of shares being accumulated and distributed each day as "volume force". A strong, rising volume force should accompany an uptrend and then gradually contract over time during the latter stages of the uptrend and the early stages of the following downtrend. This should be followed by a rising volume force reflecting some accumulation before a bottom develops.

* By converting the volume force into an oscillator representing the difference between a 34-period and 55-period exponential moving average with a 13-period trigger, the force of volume into and out of a security can easily be tracked. Comparing this force to price action can help identify divergences at tops and bottoms.

Interpretation

Mr. Klinger recommends the following guidelines for using the KO:

1. The most reliable signals occur in the direction of the prevailing trend. Strict stop guidelines (i.e., failure to penetrate the zero line or a violation of the trigger line) should remain in force.

2. The most important signal occurs when the KO diverges with the underlying price action, especially on new highs or new lows in overbought/oversold territory. For example, when a stock makes a new high or low for a cycle and the KO fails to confirm this, the trend may be losing momentum and nearing completion.

3. If the price is in an uptrend (i.e., above an 89-day exponential moving average), buy when the KO drops to unusually low levels below zero, turns up, and crosses its trigger line. If the price is in a downtrend (i.e., below an 89-day exponential moving average), sell when the KO rises to unusually high levels above zero, turns down, and crosses its trigger line.

While the KO works well for timing trades in the direction of the trend, it is less effective against the trend. This can create problems for the trader trying to "scalp" a trade against the prevailing trend. However, when the KO is used in conjunction with other technical indicators, better results can be achieved. William's %R is recommended for confirming an overbought/oversold price condition and Gerald Appel's MACD is recommended for confirming the short-term direction of price.

Tip

Stephen Klinger suggests the following formula for viewing the cumulative flow of money into and out of a security:

cum(kvo())

Plot a 13-period moving average of the formula as a trigger line for entering buy and sell trades.

source codenya untuk trade station

Type: Function, Name: VForce

Vars: TSum(0), Trend(0), DM(0), CM(0);

TSum = High + Low + Close;

IF TSum > TSum[1] Then

Trend = 1

Else

Trend = -1;

IF Trend = Trend[1] Then

CM = CM + Range

Else

CM = Range + Range[1];

IF CM 0 Then

VForce = Volume * AbsValue(2 * (DM/CM) -1) * Trend * 100;

Type: Function, Name: KVO

Inputs:

FastX(Numeric),

SlowX(Numeric); Vars:

FXAvg(0),

SXAvg(0);

FXAvg = XAverage(VForce, FastX);

SXAvg = XAverage(VForce, SlowX);

KVO = FXAvg - SXAvg;

Type: Indicator, Name: Klinger Volume Oscillator

Inputs:

FastX(34),

SlowX(55),

TrigLen(13),

Smooth(1);

Vars:

Trigger(0);Trigger = XAverage(KVO(FastX, SlowX), TrigLen);IF Smooth <= 1 Then Begin

Plot1(KVO(FastX, SlowX), "KVO");

Plot2(Trigger, "KVO Trigger");

End Else BeginPlot1(Summation(KVO(FastX, SlowX), Smooth), "KVO");

Plot2(Summation(Trigger, Smooth), "KVO Trigger");

End;

Plot3(0, "Zero");

IF Plot1 Crosses Above Plot2 OR Plot1 Crosses Below Plot2 OR

Plot2 Crosses Above Plot3 OR Plot2 Crosses Below Plot3 Then

Alert = True;

someone would like to help me to convert this coding into Mql4?

thks

Here it is (I think). It's been a while since your post but I just found this thread yesterday...

Files:
klinger.mq4  3 kb
 

MathMod Anomalies, could someone explain this ?

hello i try to code like below:

Alert(MathMod((13635/1),3)+" "+MathMod((1.36350000/0.0001),3));

funny thing is... the result is different:

Alert: 0.00000000 3.00000000

which supposed to be the same...

why this happen ?

 

double MathMod( double value, double value2)

Both numbers should be double.

Try

Alert(MathMod((13635.0/1.0),3.0)+" "+MathMod((1.36350000/0.0001),3.0));

 

Programmierer gesucht!

Hallo,

ich suche einen erfahrenen Programmierer, der mir bei einem bereits vorhandenen EA einen Fehler beseitigen kann.

 

Simple EA Request

Hello, I have a few indicators that I use for trade entries and I was curious if someone could help me out with a few simple ea's because I haven't been able to find them around the internet. The first one is called DSS Bressert, it's a form of Double Smoothed Stochastic and can be found here: http://www.forexfactory.com/attachment.php?attachmentid=222585&d=Mar 23, 2009 2:22pm What I'm looking for in this ea is to open a position when a particular level is crossed. for example, a sell will open when the price exceeds level 80 and then crosses down past 80. and a buy will occur when the price crosses 20 and then turns to raise above 20. The only thing is if possible I would like the levels to be adjustable in the settings. Another feature I would like if possible would be a "long only" or "short only" setting so the ea will trade in only one direction or both if i so choose. A final setting would be a "close all at price" setting so for example if i'm doing all sell orders and the price is 98.100 I can set it so all positions close at 97.000. I would like this EA to be able to open more than one positions at a time and possibly with a magic number. I have many other features in mind but those are the basics and I don't want to get too greedy.

The other indi I use and would like an ea for is Barry's support and resistance. which can be found here: http://www.forexfactory.com/attachment.php?attachmentid=221898&d=Mar 21, 2009 9:13pm what I'm looking for in this EA is to have the ability to open a trade sell at resistance, and buy at support, but most importantly I would like it to have an "alert only" setting in which it can be used simply to alert when a new support/resistance has been identified.

Honestly I have Ideas to make an extremely profitable trading system and would like a programmer to work with who has some free time. I was working with a guy for a week or so but he disappeared. So if anyone has any free time please let me know and we can work together to make some real cash.

 

Is it possible to give out an error message if DLL calls are not allowed?

Thanks in advance.

 
jan100:
Is it possible to give out an error message if DLL calls are not allowed? Thanks in advance.

Use this in the init() section of your code:

if (IsDllsAllowed() == false)

{

Alert("Dll is NOT ALLOWED!!!");

}
 

thank you :-)