Move SL during current candle
Forums › ProRealTime English forum › ProOrder support › Move SL during current candle
- This topic has 18 replies, 2 voices, and was last updated 3 years ago by Nicolas.
-
-
08/22/2018 at 10:45 AM #78763
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!
08/22/2018 at 10:51 AM #78765You 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.
1 user thanked author for this post.
08/22/2018 at 10:53 AM #7876708/22/2018 at 10:55 AM #78768All 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!
1 user thanked author for this post.
08/22/2018 at 11:01 AM #78769Nicolas – 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?
08/22/2018 at 1:30 PM #78791MTF 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.
08/22/2018 at 1:38 PM #78794Heard 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….
08/22/2018 at 1:49 PM #7879808/24/2018 at 12:23 PM #78934So, 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)?
08/24/2018 at 4:22 PM #78984Nicolas – 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.
08/24/2018 at 4:33 PM #78986Just 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!
08/26/2018 at 10:02 AM #79095I 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! 🙂
08/26/2018 at 7:28 PM #79130I 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.
123456789101112131415161718192021222324252627282930defparam cumulateorders=false//declare the strategy on the 1 hour timeframetimeframe(1 hour, updateonclose)myrsi = rsi[14]buycondition = myrsi crosses over 50//orders management on the 1 minute timeframetimeframe(1 minute, default)//create an order at market if the RSI has crosses the level 50 on the 1 hour timeframeif buycondition thenbuy 10 contract at marketendif//if not order on market, reset the breakeven statusif not onmarket thenbreakeven=0endif//check if the current order has made 15 points of profitif longonmarket and close-tradeprice>=15*pointsize thenbreakeven=1endif//put stoploss at open price + 5 pointsif breakeven=1 thensell at tradeprice+5*pointsize stopendifgraph breakevenupdate version here: https://www.prorealcode.com/topic/breakeven-avec-ut-inferieure-a-la-strategie/#post-210582
10/19/2018 at 10:20 AM #83168Hi Nicolas,
quite useful on the paper but unable to make it work ; I get this message enclosed ;
cheers
10/19/2018 at 12:48 PM #83177 -
AuthorPosts
Find exclusive trading pro-tools on