Returns the Keltner Band upper line value.
Syntax:
1 |
KeltnerBandUp[period] |
Where:
- period= calculation period of the Keltner Band
Returns the Keltner Band upper line value.
Syntax:
1 |
KeltnerBandUp[period] |
Where:
Returns the KijunSen value (component of the “ichimoku kinko hyo” indicator).
Syntax:
1 |
KijunSen[9,26,52] |
Kijun Sen represents the average point of the last 26 periods. This is the average of the highest and lowest of the last 26 periods (last 26 candlesticks).
Returns the last index of the array defined by the code. If no index was previously defined, the function returns -1.
Syntax:
1 |
lastset($var) |
where $var is the name of the variable array.
Instruction introducing a limit order in x units. Pending orders must be re-placed at each new bar.
Syntax:
1 |
BUY AT x LIMIT |
Example :
1 2 3 4 5 6 |
myMACD = MACD[12,26,9](close) long = myMACD crosses over 0 IF long THEN BUY 1 LOT AT close-10 LIMIT ENDIF |
Return the LinearRegression value of selected price over the last N periods.
Syntax:
1 |
LinearRegression[N](price) |
This indicator represents the buyers and sellers who trade away from the equilibrium price.
The equilibrium could be compared to this lenearRegression line.
In order to limit extreme prices relative to thisequilibrium price it is worth plotting the raff channel which will represent the straight Linear Regression line and two supposed extreme lines to represent maximum variations.
Suggestion:
You could use this script in ProBuilder to display the Linear Regression Oscillator. You should make a copy pasting in ProBuilder REM Linear Regression
a=LinearRegression[10](close)
REM close
b=close
REM linear Regression Oscillator
c=b-a
return c
Example:
1 2 3 4 5 6 7 |
lasthigher = Highest[20](high) higherB = LinearRegression[20](lasthigher) lastlower = Lowest[20](low) lowerB = LinearRegression[20](lastlower) center = (higherB+lowerB) / 2 RETURN higherB as "Higher Band", lowerB as "Lower Band", center as "Center" |
Return the Linear Regression Slope value of selected price over the last N periods.
Syntax:
1 |
LinearRegressionSlope[N](price) |
This indicator represents the direction of the trend.
If the indicator rises above the 0 level, then we are in an uptrend and when the indicator falls below the 0 level, then we are in a downtrend.
The higher the indicator is the more the trend is important
With this indicator, we suggest that you use the R squared to confirm the trend.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
i1 = LinearRegressionSlope[10](close) IF(i1>0 AND i1[1]<0) THEN bullish = 1 bearish = 0 ELSIF(i1<0 AND i1[1]>0) THEN bullish = 0 bearish = -1 ELSE bullish = 0 bearish = 0 ENDIF RETURN bullish, bearish |
Mathematical function “Neperian logarithm” of ‘a’ value.
Syntax:
1 |
LOG(a) |
Indicates whether you have open long positions or not.
Syntax:
1 |
LONGONMARKET |
Example :
1 2 3 |
IF NOT LongOnMarket THEN BUY 1 LOT AT MARKET TomorrowOpen ENDIF |
Allows to know if a Long position has been opened on the candlestick N (N optional by default at 0). (more…)
Set a stop loss x units from the average position price.
Syntax:
1 |
Set STOP LOSS x |
Example :
1 2 3 4 5 6 7 8 9 |
myMACD = MACD[12,26,9](close) long = myMACD crosses over 0 IF NOT LongOnMarket AND long THEN BUY 1 CONTRACTS AT MARKET ENDIF //set stop loss at 50 pips from the average position price (on a 5 digits instrument) SET STOP LOSS 0.0050 |