Allows you to set a protective stop at the entry price of the current position (SET STOP)
or a protective target in case of a position in loss (SET TARGET)
Allows you to set a protective stop at the entry price of the current position (SET STOP)
or a protective target in case of a position in loss (SET TARGET)
Instruction to open a long position.
Syntax:
1 |
BUY x SHARES |
Example :
1 2 3 |
IF NOT LongOnMarket AND LongConditions THEN BUY 1 SHARES AT MARKET ENDIF |
Purpose of this instruction is to avoid computer memory consumption by limiting the bars quantity use in indicator calculation.
This parameter increases the speed at which an indicator will be calculated by defining the number of bars that will present the result.
Syntax :
1 |
DEFPARAM CalculateOnLastBars = 200 |
“CALL” is an instruction made for calling value of user indicator. Add under brackets as many parameters the personal indicator have.
Syntax:
1 |
myValue = CALL "myIndicator"[parameter1,parameter2] |
If the personal indicator returns more than one value from its RETURN instruction, the CALL function should be coded like this:
(case of an indicator that return 3 values)
1 |
myValue1, myValue2, myValue3 = CALL "myIndicator"[parameter1,parameter2] |
3 variables are set from the the 3 returns variables of the custom indicator “myIndicator”.
Amount of cash used in the position.
Syntax:
1 |
BUY x CASH |
Return the value of the CCI technical indicator “Commodity Channel Index”.
Syntax:
1 2 3 |
CCI[N](price) or CCI[N] |
Calculation :
CCI calculates the distance between a price and its average over x days divided by 1.5% of the mean absolute deviation.
CCI = (Price – MM) / (0.015*D)
Where :
Price (Typical Price by default, but can be any Price type) = (H+L+C) / 3
MM = moving average on M with n days
D = standard deviation on the moving average
Returns the integer numeric value closest from above.
Syntax:
1 |
ceil(var,digits) |
“digits” is optional. It is the number of digits after decimal point.
Return the Chaikin oscillator technical indicator value.
Syntax:
1 |
ChaikinOsc[Ch1,Ch2](price) |
Calculation :
The Chaikin Oscillator is created by substracting an x period exponential moving average of the Accumulation Distribution Line from a y period exponential moving average of the Accumulation Distribution Line.
(Default values are : x = 10 ; y = 3).
Return value of the technical indicator “Chande Kroll Stop” upper band, usually used for placing stoploss on long positions.
Syntax:
1 |
ChandeKrollStopDown[Pp,Qq,X] |
This indicator is a potential stop for a long position. It is displayed as a green line overlaid on the price chart. The green line is the stop level for a long position.
Calculation :
First low stop = Lowest[p](low) + x * Average True Range[p]
Stop long = Lowest[q](first low stop)
Return value of the technical indicator “Chande Kroll Stop” upper band, usually used for placing stoploss on short positions.
Syntax:
1 |
ChandeKrollStopUp[Pp,Qq,X] |
This indicator is a potential stop for a short position. It is displayed as a red line overlaid on the price chart. The red line is the stop level for a short position.
Calculation :
First high stop = Highest[p](high) – x * Average True Range[p]
Stop short = Highest[q](First high stop)