API Applied Prices constants: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
! Constant name !! Description | ! Constant name !! Description | ||
|- | |- | ||
| '''PRICE_CLOSE''' || Close | | '''Applied_Price.PRICE_CLOSE''' || Close | ||
|- | |- | ||
| '''PRICE_OPEN''' || Open | | '''Applied_Price.PRICE_OPEN''' || Open | ||
|- | |- | ||
| '''PRICE_HIGH''' || High | | '''Applied_Price.PRICE_HIGH''' || High | ||
|- | |- | ||
| '''PRICE_LOW''' || Low | | '''Applied_Price.PRICE_LOW''' || Low | ||
|- | |- | ||
| '''PRICE_MEDIAN''' || (High + Low)/2 | | '''Applied_Price.PRICE_MEDIAN''' || (High + Low)/2 | ||
|- | |- | ||
| '''PRICE_TYPICAL''' || (High + Low + Close)/3 | | '''Applied_Price.PRICE_TYPICAL''' || (High + Low + Close)/3 | ||
|- | |- | ||
| '''PRICE_WEIGHTED''' || (High + Low + Close + Close)/4 | | '''Applied_Price.PRICE_WEIGHTED''' || (High + Low + Close + Close)/4 | ||
|} | |} | ||
=== Examples === | === Examples === | ||
C# code snippet : | C# code snippet : | ||
<br><code> double | <br><code> double MA_Value = iMA(Symbol(), Period(), PeriodIndicator, 0, MA_Method.MODE_SMA, Applied_Price.PRICE_CLOSE, index); |
Latest revision as of 11:00, 5 January 2023
Summary
The Applied Price constants are mainly used in Moving Average functions (ie: GetMA() function) to set the type of the Moving Average Price
Definition
Constant name | Description |
---|---|
Applied_Price.PRICE_CLOSE | Close |
Applied_Price.PRICE_OPEN | Open |
Applied_Price.PRICE_HIGH | High |
Applied_Price.PRICE_LOW | Low |
Applied_Price.PRICE_MEDIAN | (High + Low)/2 |
Applied_Price.PRICE_TYPICAL | (High + Low + Close)/3 |
Applied_Price.PRICE_WEIGHTED | (High + Low + Close + Close)/4 |
Examples
C# code snippet :
double MA_Value = iMA(Symbol(), Period(), PeriodIndicator, 0, MA_Method.MODE_SMA, Applied_Price.PRICE_CLOSE, index);