is it possible to create an ‘automatic trade’ using different timescales with the same security? i.e. MACD from FTSE 1 hour, FTSE 30 MINS AND FTSE 5 MINS all being above a certain value to trigger a buy order. I can do this with the manual trading/ triggers/ alerts in Pro Real Time but I can’t seem to set up the order with multiple time scales within the auto trading.
you have to use multi-timeframe (MTF), it will look something like the example below.
You have to run the system on a timeframe that can be divided into all other timeframes; in this case that would mean 5minute, 1 minute, 30 seconds etc
you can read more about MTF here:
https://www.prorealcode.com/topic/multi-timeframe-mtf-indicators-for-prorealtime/
TIMEFRAME(1 hour)
cb1 = (your 1 hour conditions)
TIMEFRAME(30 minutes)
cb2 = (your 30 minute conditions)
TIMEFRAME(5 minutes)
cb3 = (your 5 minute conditions)
if cb1 and cb2 and cb3 then
buy 1 contract at market
endif
thank you for this
very helpful
what is the difference between….
timeframe(1 hour,updateonclose) and timeframe(1 hour) ?
timeframe(1 hour, updateonclose) means that your conditions can only be met at the end of the 1h candle
with timeframe(1 hour) your conditions can be met at any time within the 1h candle while it is still forming.