This MUST get fixed
Forums › ProRealTime English forum › ProOrder support › This MUST get fixed
- This topic has 30 replies, 5 voices, and was last updated 3 hours ago by
phoentzs.
-
-
05/01/2025 at 11:49 AM #246615
Hi Franro,
Sorry to be the xth person jumping on you, but you should really try to think the other way around.
Everything, really everything can be done, if you only have a correct base of thinking how the logic “is”. I will try to explain this latter :If the Chart is 1 minute, inside of the coding you can do ALL you want from 1 minute up to days and beyond (if it is only a multiple of 1 minute in your coding – and you understand that perfectly). So where can it go wrong ?
First off, a Stop Loss, which is a pending order command, is not related to any TF at all. You put it, and it is active. However :
You might want to change it at the higher granularity, which is … 1 minute. Thus, a SL can be reset all right, and thus changed per the 1 minute (the TF of your chart – could also be 5 seconds etc.). Nothing can go wrong …
All what could happen is that you want it the other way around – such as changing the SL (etc. etc.) at the interval of the (1) hour. Well, then you put a TimeFrame command and under the scope of that you reset and change the SLThis is now only about the SL while it could be about anything. And there really really is nothing you can not apply like described above IF ONLY you accept the smaller TF for limiting your backtesting. Thus, it must be clear that using a TF on the chart of 1 minute, brings something like 1440 time (a bit less) length of backtesting. So if you are not afraid of that, then believe me please, all what you want can be done.
Intermezzo : you said Trailing Stop, which is for IB *or* a Pending Stop to begin with, *or* just a Market order, or indeed a SL (Set Stop Loss). For IG the Trailing Stop really can exist. In your later post you started to talk about the SL, which I just dealt with and which can work too, but looks a bit odd to me.
Let’s make it more practical : If you give one concrete example of something you can not do, we will work out that example to a working situation. No need to give code – just description. One thing : you should start your thesis with thinking of the 1 minute (or less) TF of the chart. In the code you have TimeFrame commands (always of longer time than the Chart’s TF, or of the same time as the Chart).
Deal ?05/01/2025 at 11:51 AM #24661605/01/2025 at 11:56 AM #246617@PeterST what are you talking about?
I have a 4 hour system that my stoploss only update every 4 hour, 13.00, 17.00, 21.00, 01.00 and so on. So if at 13:50 my latent gain is : 4000€/1 point. And my in my trailingstopcode it should start at ticking at 0.4% but as it updates every 4 hours I am not allowed to use it on 1 minute. When time has came to 17.00 my latent gain can be 2€ instead, and then the trail will not start. There for higher timeframe systems do not work well as there is not a way to use a the trailingstop on lower timeframe.
05/01/2025 at 11:58 AM #246618Franro, you are correct that the way JS accidentally brings it, can not work. But this is a “typo” or meant differently :Yes, you can run a system on a 1 hour timeframe with a trailing stop on 1 minute…
The “system” as such, is the functional system. As in : All works with 1 hour, but the details (like adjusting trailing) are done per the minute.
This is a matter of speaking.So, 100% sure that JS should have said : the chart runs on 1 minute, and the functional system deals with 1 hour (calculating the averages, maybe entries only once per hour).
And if am om not correct on the “typo” of JS, then he has to explain something. 🙂
05/01/2025 at 11:59 AM #246619@PeterST what are you talking about?
I have a 4 hour system that my stoploss only update every 4 hour, 13.00, 17.00, 21.00, 01.00 and so on. So if at 13:50 my latent gain is : 4000€/1 point. And my in my trailingstopcode it should start at ticking at 0.4% but as it updates every 4 hours I am not allowed to use it on 1 minute. When time has came to 17.00 my latent gain can be 2€ instead, and then the trail will not start. There for higher timeframe systems do not work well as there is not a way to use a the trailingstop on lower timeframe.
Please remember : start your thinking with the Chart being at 1 minute. 🙂 Then your text can’t apply.
You could have another text though. 🙂05/01/2025 at 12:06 PM #24662105/01/2025 at 12:11 PM #24662205/01/2025 at 12:15 PM #24662305/01/2025 at 12:53 PM #246628And exactly that is the problem @JS. “That requirement” ruins all systems on higher timeframes which I think MUST be changed
If Instead run the system on 1 minute I will not get the same results. You can test it yourself.
Test this on 1 hour timeframe.
Timeframe (1 hour)
MA1Hour = average[200,8](typicalprice)
Entrycondition = (close>MA1Hour)IF NOT LongOnMarket AND Entrycondition THEN
BUY 1 CONTRACTS AT MARKET
ENDIF//Timeframe (1 minutes)
if time = 170000 then
sell at market
endifThen test this on 1 minute timeframe.
Timeframe (1 hour)
MA1Hour = average[200,8](typicalprice)
Entrycondition = (close>MA1Hour)IF NOT LongOnMarket AND Entrycondition THEN
BUY 1 CONTRACTS AT MARKET
ENDIFTimeframe (1 minutes)
if time = 170000 then
sell at market
endif05/01/2025 at 2:12 PM #246631https://www.prorealcode.com/blog/learning/approach-multi-timeframe-trading-prorealtime/
1 user thanked author for this post.
05/01/2025 at 2:35 PM #24663205/01/2025 at 2:48 PM #24663605/01/2025 at 2:53 PM #24663705/01/2025 at 3:08 PM #24663905/01/2025 at 3:15 PM #246641 -
AuthorPosts
Find exclusive trading pro-tools on