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
When 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?
Hi 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!
As for the start of the strategy simply just on the 2nd bar for entry say 1 red then 2nd consecutively would be entry point
i have carried out calculations and tested via a walkthrough in realtime and the results are good enough for my first strategy idea
Incase you test the strategy i have been using Heikin Ashi and the results can vary dependant on the market best 5 minute time frame
Ok, I’ll code something asap.
i 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
On the forum coding is absolutely free.
signing off tonight until tomorrow
There you go, this is the basic code (tested on DAX, Daily TF):
DEFPARAM CumulateOrders = False
Bullish = close > open
Bearish = close < open
BullishSignal = Bearish[2] AND Bullish[1] AND Bullish
BearishSignal = Bullish[2] AND Bearish[1] AND Bearish
IF BullishSignal AND Not LongOnMarket THEN
BUY 1 CONTRACT AT MARKET
ELSIF BearishSignal AND Not ShortOnMarket THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
Thanks Roberto i will test your strategy now, you are a great person!
Can someone present backtest 6 month for this one
PaulParticipant
Master
MTF 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.