Buying an Outside candle via BuyStop
Forums › ProRealTime Deutsch forum › ProOrder Support › Buying an Outside candle via BuyStop
- This topic has 5 replies, 2 voices, and was last updated 4 years ago by f1_maik.
-
-
10/10/2020 at 1:32 PM #146974
How do I program this?
Stopbuy at High Outside + 25% * (High of the Outsidecandle -Low of the Outsidecandle)
the stopbuy should only be executed within the next 3 candles
Target Profit = High Outside + 50% * (High of the Outsidecandle – Low of the Outsidecandle)
Stop Loss = Low Outsidecandle10/10/2020 at 3:31 PM #146996There you go (not tested):
123456789101112131415Defparam CumulateOrders = falseOutside1 = high > high[1] and low < low[1]Outside2 = max(open,close) > max(open[1],close[1])Outside3 = min(open,close) < min(open[1],close[1])OutsideBar = Outside1 and Outside2 and Outside3If OutsideBar thenEntry = high + (range * 0.25)TP = abs(Entry - (high + (range * 0.50)))SL = abs(Entry - low)EndifIf summation[3](OutsideBar) thenBuy 1 contract at Entry STOPSet Target Profit TPSet Stop Loss SLEndif1 user thanked author for this post.
10/10/2020 at 4:17 PM #14700110/11/2020 at 4:51 PM #147065Maybe one more step back. Maybe you can help me again.
I understand that this part of code, define entry, sl, tp – correct?
entry, sl, tp12345If OutsideBar thenEntry = high + (range * 0.25)TP = abs(Entry - (high + (range * 0.50)))SL = abs(Entry - low)EndifWhich part of the code says that the StopBuy is only executed with the next 3 candles? With this one?
n = 512345If summation[3](OutsideBar) thenBuy 1 contract at Entry STOPSet Target Profit TPSet Stop Loss SLEndifand if so and I would set n=5, then the StopBuy would only be possible within the next 5 candles – correct?
n = 5123456n = 5If summation[n](OutsideBar) thenBuy 1 contract at Entry STOPSet Target Profit TPSet Stop Loss SLEndifAllright?
10/11/2020 at 6:04 PM #147067All of your assumptions are correct.
10/12/2020 at 12:35 PM #147157So fine and a big thank you to you.
The first step of the strategie is done.
1 user thanked author for this post.
-
AuthorPosts