Request for Automated strategy 2BarUpDn
Forums › ProRealTime English forum › ProOrder support › Request for Automated strategy 2BarUpDn
- This topic has 15 replies, 4 voices, and was last updated 4 years ago by
martobrien1.
-
-
06/24/2021 at 8:51 PM #172363
Hi Folks,
Does any have a code for a strategy i would like to use?
Entry on 2nd bar for long and to short
Exit on 2nd bar ie, red to exit long, and exit on 2nd green bar for shorting
Also to be able to stop automated on either long or short while allowing one or the other to run.
I thank you for allowing me to pick your brains
Margaret
06/24/2021 at 9:08 PM #172366When launching the strategy how does the count of bars need to start?
The first two green bars trigger a Long trade and the first two red bars a Short trade?
So it’s a continuous Stop & Reverse where two bars of the same colour exit an open trade and open a new, opposite, one?
What’s the rule to stop trading one direction or the other?
1 user thanked author for this post.
06/24/2021 at 9:16 PM #172367Hi Roberto
Yes that’s correct the entry on 2nd bar of either and exit on 2nd bar is like a stop and reversal yes.
The rule for to stop either going long or short running in automated doesn’t need to be a rule but i thought it may be good fine tuning in case of say a long trade where the shorts weren’t worth taking where you could intervene and put stop to the shorts or longs to minimize losses.
But yes the reversal continuously is my main brainchild.
What do you think lol!
06/24/2021 at 9:19 PM #172368As for the start of the strategy simply just on the 2nd bar for entry say 1 red then 2nd consecutively would be entry point
06/24/2021 at 9:28 PM #172370i have carried out calculations and tested via a walkthrough in realtime and the results are good enough for my first strategy idea
06/24/2021 at 9:35 PM #172371Incase you test the strategy i have been using Heikin Ashi and the results can vary dependant on the market best 5 minute time frame
06/24/2021 at 9:58 PM #172375Ok, I’ll code something asap.
06/24/2021 at 10:46 PM #172376i can see your page and im very impressed with your trading resume also that you make codes for prorealcode if there is a cost for your services please let me know, and thankyou Roberto, Margaret
1 user thanked author for this post.
06/24/2021 at 10:53 PM #172377On the forum coding is absolutely free.
06/24/2021 at 11:18 PM #17237906/24/2021 at 11:28 PM #172380signing off tonight until tomorrow
06/25/2021 at 3:14 PM #172430There you go, this is the basic code (tested on DAX, Daily TF):
12345678910DEFPARAM CumulateOrders = FalseBullish = close > openBearish = close < openBullishSignal = Bearish[2] AND Bullish[1] AND BullishBearishSignal = Bullish[2] AND Bearish[1] AND BearishIF BullishSignal AND Not LongOnMarket THENBUY 1 CONTRACT AT MARKETELSIF BearishSignal AND Not ShortOnMarket THENSELLSHORT 1 CONTRACT AT MARKETENDIF1 user thanked author for this post.
06/25/2021 at 8:45 PM #172478Thanks Roberto i will test your strategy now, you are a great person!
06/26/2021 at 3:02 PM #17252706/26/2021 at 4:52 PM #172537MTF might be interesting. 4hour timeframe, 2 or xx bars minimum green/red , in Heikin Ashi
15 minute entry every 2nd or xx bar only in the direction set by 4 hour, also with Heikin Ashi.
Maybe close on change in direction in 15m, but not trading against the 4 hour trend.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on