CURRENT_PRICE

JedeyeFX Documentation

shp.png

CURRENT_PRICE

Sometimes you may need to make some comparisons with the current market price in your strategies. The CURRENT_PRICE function extracts the current market price at the time the condition is checked by the expert advisor.

Syntax
current_price(prev_flag)
Parameters

prev_flag

(optional)

This object is optional and allows you to tell JedeyeFX to extract the “previous current price” stored in memory from the last conditions evaluation (usually it is the one from the last bar, unless the Trigger Events At New Bars Only   input is set to false. Since it is a flag parameter, it means that you can put any alphanumeric char inside in order to activate it or leave empty in order to keep it deactivated. For the sake of interpretation and manual referencing, it is recommended to put PREV or LAST as objects.
Single-sided No
Example CURRENT_PRICE()>VAL(1.3510)
In this example, the current market price should be above 1.3510 in order to the condition be considered true.
CURRENT_PRICE()<CURRENT_PRICE(PREV)
This example explores the ability of building a condition which checks if the current market price is lower than the market price value of the previous condition evaluation.