Profit optimisation strats based on 1h n htf
Forums › ProRealTime English forum › ProOrder support › Profit optimisation strats based on 1h n htf
- This topic has 10 replies, 3 voices, and was last updated 10 months ago by ashehzi.
-
-
01/09/2024 at 11:42 AM #226138
Hi all,
I understand if running on lower timeframe, we have many ways to close the gains. I am more interested in 1h and higher tfs. 1h means not the code will run only once an hour so I’ve to rely on profit limit orders.
Options to optimise profits I think of e.g.
- prev day high/low
- daily atr move
- close end of day when RTH finishes.
- pivots
- vwaps from prev days
any tested methods more appealing? anything ? Thanks.
Regards,
Ash
01/09/2024 at 11:53 AM #226139Hi Ash,
1h means not the code will run only once an hour so I’ve to rely on profit limit orders.
Is this “not” correct in there ? I take it that you meant the “not” not to be in there. Then :
If the TF of your chart is e.g. 5 minutes, then you can exit each 5 minutes with a Market order (or still a Limit or Stop order). What you would do :
The code which works with 1h or longer is to be preceded by
1TimeFrame 1 hourAt the place of the planned Exits (the code for it) inject a
1TimeFrame(5 minutes, UpdateOnClose)Now you’ll have access to the Exit each 5 minutes.
Is that what you want to achieve ? if not, then possibly that “not” has to be in your sentence after all, and I can’t understand what you mean (yet).
Of course I understand your suggestions, but they may not be necessary ?01/09/2024 at 11:57 AM #22614001/09/2024 at 12:46 PM #226144any tested methods more appealing?
It’s surprising how effective below works … when optmised we get a grand average for X and Y that actually shows good results over the full period.
Don’t necessarily choose the values giving highest gain (after optimisation).
12345If BuyCond ThenBuy at MarketSet Stop pLoss XSet Target pProfit YEndif01/09/2024 at 1:05 PM #226148Thanks <span class=”bbp-author-name”>GraHal</span>. I think I get your point. My code for most of the instrument specific algos is same i.e. define a level with a limit sell/buy order with defined stoploss and target profit.
There is a trade off if you change stoploss to breakeven (at next run of your code on 1h assuming it is moving in your favour), you may close it for no gain, no risk no reward comes to my mind, always a tricky thing.
Assuming I shorted NAS at 16591, with target profit of 16551. The problem I face is how to understand that it is a trend day and closing at the end of RTH would be a better option than targeting a defined profit level. Afterall, what makes the difference is how much you made and how much you left on the table.
01/09/2024 at 1:29 PM #226149If after exiting – we think – ‘too early’ (using Set Target pProfit y) and our entry criteria is still valid / still existing then our strategy would open another trade.
Only costs us a few points spread to enter again.
If entry criteria is NOT still valid / NOT still existing after exit (as above) then should we even be hanging around in the trade waiting / hoping for more profit?
If we would not BUY right now, then maybe we should EXIT right now?? 😉
Just a few general thoughts / ideas.
01/09/2024 at 1:37 PM #226150I get your point, one can add level to level trading, if closed lower where you e.g. exited your short, then enter again on that level retest down to next lower level like step by step move but sometimes moves are faster and doesn’t allow retesting. If I don’t include retesting and short at market (not limit), then risk factor increases. Incorprating these different options is possible based on the movement e.g. candle (body) size.. but you have to wait for the move to pan out. One option could be to leave target profit empty for 1st hour close (stoploss in place though) so if if the move is faster and better than expected, you can gain more.
01/09/2024 at 1:46 PM #226153leave target profit empty for 1st hour
If we put Set Target pProfit Y outside the If EndIf Conditions then Y Profit will not be applied until the close of the 1st hour anyway (running on a 1 hour Timeframe).
Above is an easy way achieve the quoted text.
01/09/2024 at 1:55 PM #22615512345678BuyCond = a and b and cIf BuyCond ThenBuy at Market // replace with limit whatever you logic isSet Stop pLoss XEndifSet Target pProfit YIsn’t it the whole algo code runs from top to bottom whatever timeframe it runs on? In case of “at market”, it will run straight away while in case of “limit order” it will give you 1 hour as limit order will be placed at barindex while the run of “target pProfit y” will be at barindex+1.
01/09/2024 at 7:20 PM #226174“limit order” it will give you 1 hour as limit order will be placed at barindex
Below would open a trade just a soon as price is 34000 (No waiting 1 hour etc)
12345678BuyCond = a and b and cIf BuyCond and Close > 34000 ThenBuy at 34000 Limit // Market // replace with limit whatever you logic isSet Stop pLoss XEndifSet Target pProfit Ythe run of “target pProfit y” will be at barindex+1.
Agreed, pProfit y will be set / will appear at the open of the 2nd hour … if the Buy Order has been executed.
Anybody disagree, feel free to comment?
01/09/2024 at 9:57 PM #226177Yes, I meant the same. E.g.
limit order is left at 9am
9am – 10am it can get executed anytime based on the PA.
If not executed in that hour, you can re-evaluate to place it again or remove it in your code
Assuming it did get triggered between 09am and 10am, then at next execution i.e. 10am, you can place a target pprofit or even can wait for x number of bars e.g. if barindex > tradeindex+2
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on