detect previous 3 candles close price

Back to topics list To post a new topic, please log in or register
avatar
111
fulltilt 2015.01.15 09:05
 

I want to check for valid entrys on previous 2 candles and current f.ex.

--------
3 | 1.86
--------
2 | 1.87
--------
1 | 1.88  = new candle
--------

Buy if candle 3 < as candle 2 and new candle is higher as candle 2

1x blue 2x red = sell

the new bar is calculated by new bar open price which should be above the close price of candle 2 and the new bar direction is up

in PHP something like below ... but I need this with the last candle price varibables

if($candle[0]< $candle[1] AND $candle[2] > $candle[1]) 
{
 $buycheck = true;
}
avatar
12985
WHRoeder 2015.01.15 13:42 #
 
fulltilt: I want
learn to code. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
avatar
1211
deysmacro 2015.01.15 13:53 #
 
https://www.mql5.com/en/job
Back to topics list  

To add comments, please log in or register