3-10 Oscillator Swing Trading System
Forums › ProRealTime English forum › ProOrder support › 3-10 Oscillator Swing Trading System
- This topic has 16 replies, 4 voices, and was last updated 1 year ago by JS.
-
-
03/01/2023 at 11:29 AM #210706
Good morning
I would like to create this Backtesting on this Swing strategy:
Long Entry Rules:
ADX>30
+DMI> -DMI
the 3-10 oscillator must have at least 5 consecutive bearish days (the 3-10 oscillator is a difference between the 3-period simple moving average and the 10-period simple moving average)
If the market closes above the open, buy long on the close.
Exit rules:
Exit on the close after 3 to 7 bars.
Can you help me develop it?
Thank you
03/01/2023 at 11:57 AM #210713Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums
Thanks 🙂
1 user thanked author for this post.
03/02/2023 at 7:18 PM #210790You also used the wrong support forum, for strategies the correct one is the ProOrder support forum. I moved it.
There you go:
12345678910111213DEFPARAM CumulateOrders = FalsemyADX = adx[14] > 30myDMI = DIplus[14](close) > DIminus[14](close)Sma3 = average[3,0](close)Sma10 = average[10,0](close)ind310 = Sma3 - Sma10Bearish = (summation[5](ind310 < 0) = 5)IF myADX AND myDMI AND Bearish AND Not OnMarket AND (close > open) THENBUY 1 CONTRACT AT MARKETENDIFIF LongOnMarket AND ((BarIndex - TradeIndex) >= 3) THEN //exit after 3 bars (change it to any positive valueSELL AT MARKETENDIF03/02/2023 at 8:31 PM #210799Thanks a lot for your support and quick reply….sorry next time I will use the right support forum.
Stefano
1 user thanked author for this post.
03/07/2023 at 3:16 PM #211045Hello I don't get this rule 'Bearish = ( summation [ 5 ] (ind310 < 0 ) = 5 )' The rule is that the oscillator 3-10 must have 5 consecutive days 'down' for example (I modified ADX >25) . Jan 5 should have given me an entry signal: day 1 = 25 day 2 = 17 day 3 = 15 day 4 = 7 day 5 = -13 from the formula instead it doesn't give me any signal. See attachment Thank you
03/08/2023 at 12:09 PM #211090Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums. I translated it using the translator, which doesn’t keep the original format.
As to attached pics, image formats (mainly JPG, JPEG and PNG) are a better choice. PDF files should be used mainly for formatted documents.
Thank you 🙂
Anyway
1Bearish = ( summation [ 5 ] (ind310 < 0 ) = 5 )means that there must be 5 consecutive bars where the indicator 3-10 is below 0, i.e. in a bearish position as you asked (Sma3 below Sma10).
Do you want to modify the conditions?
03/08/2023 at 12:28 PM #211096Sorry… and Thanks
I didn’t want to change the rules, the rule is at least “5 consecutive down days“, maybe I didn’t clear mention before. I think that this doesn’t mean <0.
As per attached example the condition for buy it was manually/visually checked on 5 Gen 2000, but the system given me a buy signal.
I’ would like to understand the reason, maybe the indicator 3-10 is not below 0, but 5 consecutive down day of the 3-10 max or closing day?
Appreciated your support.
Thanks
Stefano
03/08/2023 at 1:02 PM #211103Please post the instrument, timeframe, date & time of an incorrect trade opened, so I can better check.
03/08/2023 at 1:45 PM #211110Here below the requested infromations:
Instrument: Future CME e-mini S&P500 ticker ‘MESXXXX‘
Timeframe: Daily
Date: Dec. 28th 1999, ADX(14) = 26, 74 5 (S&P futures are not in a downtrend, +DI>-DI).
The 3-10 oscillator drops for at least 5 consecutive days (Dec.28th 1999 = 3-10 Osc. = 26,97, Dec.29th =22,06, Dec.30th =17,59, Dec.31st =15,11, Jan.3rd=7,45, Jan4th= – 13,25).
The S&P futures on Jan 5th close above its open. (close=1213,11, open=1211,61)
An Oscillator Swing System buy signal should also triggered on the close of Jan.5th 2000
Thanks
03/08/2023 at 6:04 PM #211131In both dates ADX < 30, how can a BUY be triggered?
03/08/2023 at 9:18 PM #211151Sorry
As I said above, I changed the ADX>30 into ADX>25 and also I take out the condition +DMI>-DMI, no buy signal was given.
DEFPARAM CumulateOrders = FalsemyADX = adx[14] > 25//myDMI = DIplus[14](close) > DIminus[14](close)Sma3 = average[3,0](close)Sma10 = average[10,0](close)ind310 = Sma3 – Sma10Bearish = (summation[5](ind310 < 0) = 5)IF myADX AND Bearish AND Not OnMarket AND (close > open) THENBUY 1 CONTRACT AT MARKETENDIFIF LongOnMarket AND ((BarIndex – TradeIndex) >= 3) THEN //exit after 3 bars (change it to any positive valueSELL AT MARKETENDIFI think that there is something in the condition ‘Bearish = (summation[5](ind310 < 0) = 5)’ because ind310 to be down for 5 days and not less than zero.I will continue in searching…thanks.03/08/2023 at 9:30 PM #21115203/08/2023 at 10:28 PM #21115303/09/2023 at 9:27 AM #21117403/09/2023 at 11:34 AM #211195In your first post asked “the 3-10 oscillator must have at least 5 consecutive bearish days (the 3-10 oscillator is a difference between the 3-period simple moving average and the 10-period simple moving average)“.
To accopmplish that a negative difference is what you need, unless you changed your mind in the meantime.
A single average less than the previous one doesn’t imply a downtrend.
-
AuthorPosts
Find exclusive trading pro-tools on