-
Morning all, ok , this is how I have been able to create bracket orders.
Using the Trading Strategy , you can use the prediction as well, just use the long or short entry signal.
1. set up a model that you want to trade . in the following chart that is the first chart. This can be in TS or Prediction .
2 Use the output from the first TS , that is the Entry signal to buy.
I use a boolean expression that is AND2 , first is the buy signal and the 2nd is that the position is ZERO . to stop it re triggering if it still has a position .
3 . I have used the Price floor in the Long protective stop . (Now i have linked the price floor with the Take profits )
4 In the Long exit, I have used the same input as the entrance price , and also that the position of the current TS is 1 . Fixing all values and selecting that it is a limit order and that 1 of the 2 conditions is true .
5 In the limit section , I need to use the rules , if the entry condition is true it is the open 1 ( locked ) + 5 points , but notice i fixed that with price floor. the next line is the Entry price +5 and fixed with the price floor as well .
6 As you can see the stop and Take profit orders are triggered for the first bar where you have the position . Look at the August 11 , 1900- 2000 hours and see that the TP was taken on the same bar that it entered the position . In both the long and short trades.
7 . As WSG point out when you are using CH , it gives the Signal on the current bar , to use that in Trading models. This is the same thing.
8 Using the price floor , as per normal it creates the Stop using the lead open 1 ,( when using a market order ) or you can change it to close on the current bar.
So using the lead Open 1 , to create the first TP , is correct , then the reason for using the Entry price when position is equal to 1 , is to be able to use the same number.
9. Now this is where you can have a lot of fun , in the limit section , you can use lead open 1, then unlock the values in the second limit calculation, and get a totally different output . PLUS you can change the entry price to be say the close , so it would be close + 5 and make that variable between say 1 and 10 .
10 if anyone has a better method , can you pls update the chart and post it.
Attachments:
You must be logged in to access attached files.
This Version 4 , using more if then in the limit section .
This closes the position if the model gets a buy or sell signal the other way round.
If it is long , and the first model changes to short , it will close at the Open 1 ,
You have to use lead open 1 to close out , if the market closes at say 3320.50
but the open is 3320.25 and you use the close and the mkt goes straight down , it will not be done , and the model will show the position as been open.
You will have to zoom in to look at the individual bars and see that the Take profits and Stop losses are in the right place and that they change .
Remember to lock the values that do not need to change , I think i unlocked the values for the sell model in the first chart . Sorry , but the other charts are locked.
So if anyone has a better system for entering bracket orders , please update the chart.
Regards
Michael.
Attachments:
You must be logged in to access attached files.
You must be logged in to reply to this topic.