Hi all,
I’m running a strategy on the 15MIN time frame on the DAX. I have a dynamic (trailing) SL that works with the “close” command.
I wonder if there is any possibility to move the SL while the candle is still open? Using “close” the SL will only be moved once the trailing conditions are met and the 15MIN candle is closed.
Going to another time frame for the strategy signal is not an option for me (i.e. going from 15 to 5min to have more checks for the SL). However, it would work if I could check the 1min candle close for the SL conditions and then adjust the SL based on this.
Any hints are highly appreciated.
Thanks!
You can now do it with the help of the multi-timeframe capability of ProOrder:
First approach to multi timeframe trading with ProRealTime
Partial closure of positions when price is retracing – A complete function
Basically, put your strategy in “timeframe(15 minutes)” and your moving SL function in “timeframe(1 minute)”, examples in the links above.
Great, this helps. Thank you so much! Outstanding support in this forum.
All decisions are made at the close of a candle so it is not possible to adjust stop loss levels mid candle. Multi time frame trading is currently possible in demo (and will hopefully soon go live) and so with this you could make all your strategy decisions on a slower timeframe and then move your stop loss value and trade on a faster time frame.
An introduction to MTF can be found here:
https://www.prorealcode.com/blog/learning/approach-multi-timeframe-trading-prorealtime/
Edit: Wow – you obviously type faster than me Nicolas!
Nicolas – I notice that you didn’t mention that those two features were only available in demo and that forward testing in demo with partial closure does not work.
Does this mean that MTF now available for live trading and does partial closure now work in forward demo testing?
MTF now available for live trading and does partial closure now work in forward demo testing?
Heard that it could done by the next daylight saving change.
Heard that it could done by the next daylight saving change.
I suppose at least that is better than by the next total lunar eclipse!
28th October I believe is the date then. Still a bit of time to wait….
Yes but it should come with the new engine pre-V11.
So, I’ve added the necessary code and I can run/backtest it.
However, I don’t understand whether I am able to use it live with my IG account? In your previous replies, you said no, but in PRT I get the pop-up to please get in contact with IG. IG customer service just told me they have no information about this?
Could you please clarify once more – can I use it live with IG already? If no, then when (only in October)?
Nicolas – I notice that you didn’t mention that those two features were only available in demo and that forward testing in demo with partial closure does not work.
Does this mean that MTF now available for live trading and does partial closure now work in forward demo testing?
Hi Vonasi, I have a sponsored PRT account with IG and requested MTF in LIVE yesterday and it’s working today if that’s of interest.
Just to clarify RobDav – you opened your IG account via PRT so you have the PRT Premium via what we call a PRT sponsored IG account?
The other way is if you open an IG account directly with IG and then you can get access to PRT Complete for free.
Your description is a little confused for me. 🙂
Still it is very interesting that you have MTF on live trading now. I’m happy to wait a little longer as I like to forward test strategies for a long time before putting them live anyway and the faster the time frame the longer I like to test!
I have a sponsored PRT account with IG and requested MTF in LIVE yesterday and it’s working today if that’s of interest.
That’s right, you can ask your broker to activate MTF, individually for your live account. I thought I told this already somewhere in the forum, anyway, thanks for letting everyone know about this opportunity! 🙂
I just stumble upon this code I made a few days earlier, it moves stoploss to breakeven once 15 pips is achieved. The stoploss is moved during a candle.
defparam cumulateorders=false
//declare the strategy on the 1 hour timeframe
timeframe(1 hour, updateonclose)
myrsi = rsi[14]
buycondition = myrsi crosses over 50
//orders management on the 1 minute timeframe
timeframe(1 minute, default)
//create an order at market if the RSI has crosses the level 50 on the 1 hour timeframe
if buycondition then
buy 10 contract at market
endif
//if not order on market, reset the breakeven status
if not onmarket then
breakeven=0
endif
//check if the current order has made 15 points of profit
if longonmarket and close-tradeprice>=15*pointsize then
breakeven=1
endif
//put stoploss at open price + 5 points
if breakeven=1 then
sell at tradeprice+5*pointsize stop
endif
graph breakeven
update version here: https://www.prorealcode.com/topic/breakeven-avec-ut-inferieure-a-la-strategie/#post-210582
Hi Nicolas,
quite useful on the paper but unable to make it work ; I get this message enclosed ;
cheers
Same message, same answer: use the code on the lowest timeframe declared by the timeframe instruction (1 minute in this case).