I am trading a 1 minute chart where I have coded a few set ups. I want to add a condition to the set up but this condition comes from a 15 minute timeframe. For example:
The first condition should be a higher low in the 15 minute candle chart. (a 15 minute candle low(candle[2]) followed by another 15 minute low (candle[1]) and than a 15 minute higher low. I know how to code it in a 15 minute chart but i can not figure out how to ad this condition to a code written on a 1 minute candle.
Can someone help me out here?
Thanks in advance. If something is not clear please let me know. I will than try to explain it clearer.
@Mert If I understood your condition (I assumed you meant the middle candle low is the lowest of all 3 lows but maybe I’m wrong and you meant the latest low is higher than the middle one regardless of [2] and [1] relative positions), the short code below should do, in which check2 is your 15 minutes condition simulated on your 1 minute timeframe.
The return line here is just to make it appear as a standalone to check it’s ok, just get rid of the return line to insert it as a condition inside your pro-builder code run on 1 minute timeframe. And obviously replace all check2 mentions with your condition’s name if it had one already.
1
2
3
4
5
6
7
8
9
10
11
12
// Noobywan 2018-11-14 for PRC forum
// To be run on 1 minute timeframe only, emulating a 15 minutes condition
//
a=lowest[15](low)
check1=a[15]<aanda[15]<=a[30]//the condition on past 3x15=45 minutes for any ongoing minute
check2=0
ifcheck1and(openminute=59oropenminute=14oropenminute=29oropenminute=44)then// only keep the condition for 1 minute candles closing at same time as 15 minutes candles
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue