10s-Scalp-SP500 Does it work?

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #196517 quote
    phoentzs
    Participant
    Master

    @Grahal


    @PeterST

    And everyone else dealing with this topic.
    For a long time I tried to create a scalper in a matter of seconds with a lot of complex code and then eventually came to the conclusion…
    Why not completely simple? A simple trade initiation and a simple trend seem to suffice. This code here seems to work in the M1 as well. What do the great masters say about this? Would something like this be tradable?
    Opinions are welcome.

    Unfortunately, the Paste code function doesn’t work here:

    //================================================
    //SP500 Spread 0.4
    //Filter
    //Trail
    //maxSL
    
    DEFPARAM CUMULATEORDERS = false
    defparam preloadbars = 10000
    
    //Risk Management
    PositionSize=5
    
    MA1 = Average[x1,0](close)
    MA2 = Average[x2,0](close)
    MA3 = Average[x3,0](close)
    
    L1 = MA1 crosses under MA3
    L2 = MA1 crosses over MA3
    L3 = MA3 > MA3[1]
    
    S1 = MA2 crosses over MA3
    S2 = MA2 crosses under MA3
    S3 = MA3 < MA3[1]
    
    long = L1 and L3
    short = S1 and S3
    ExitL = L2
    ExitS = S2
    
    // trading window
    ONCE BuyTime = 150000 //080000
    ONCE SellTime = 210000
    
    // position management
    IF Time >= BuyTime AND Time <= SellTime THEN
    
    If long Then //and myADX
    Buy PositionSize CONTRACTS AT MARKET
    
    ENDIF
    
    If short Then //and myADX
    sellshort PositionSize CONTRACTS AT MARKET
    
    ENDIF
    
    endif
    
    SET STOP %LOSS hl //1
    SET TARGET %PROFIT hl
    
    if longonmarket and ExitL then
    sell at market
    endif
    if shortonmarket and ExitS then
    exitshort at market
    endif
    
    if time = 220000 then //and dayofweek=5
    sell at market
    exitshort at market
    endif
    
    //////////////////////////////////////////
    //TrailingStop in Punkten
    //************************************************************************
    //trailing stop function
    trailingstartL = start //LONG trailing will start @trailinstart points profit //30
    trailingstartS = start //SHORT trailing will start @trailinstart points profit
    trailingstepL = step //trailing step to move the "stoploss" //1
    trailingstepS = step //trailing step to move the "stoploss"
    Distance = 1 * PipSize //7
    
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
    
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstartL*pipsize THEN
    newSL = tradeprice(1)+trailingstepL*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstepL*pipsize THEN
    newSL = newSL+trailingstepL*pipsize
    ENDIF
    ENDIF
    
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstartS*pipsize THEN
    newSL = tradeprice(1)-trailingstepS*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstepS*pipsize THEN
    newSL = newSL-trailingstepS*pipsize
    ENDIF
    ENDIF
    
    //stop order to exit the positions
    IF newSL>0 THEN
    IF LongOnMarket THEN
    IF (close - Distance) > newSL THEN
    SELL AT newSL STOP
    ELSIF (close + Distance) < newSL THEN
    SELL AT newSL LIMIT
    ELSE
    SELL AT Market
    ENDIF
    ELSIF ShortOnMarket THEN
    IF (close - Distance) > newSL THEN
    EXITSHORT AT newSL LIMIT
    ELSIF (close + Distance) < newSL THEN
    EXITSHORT AT newSL STOP
    ELSE
    EXITSHORT AT Market
    ENDIF
    ENDIF
    endif
    //************************************************************************
    Midlanddave thanked this post
    10s-Scalp-Welle-SP500.jpg 10s-Scalp-Welle-SP500.jpg PH-Scalp-Welle-10s-SP500.itf
    #196520 quote
    phoentzs
    Participant
    Master

    You can also play with the code in the M1… adjust to the market situation of the last 4 weeks. The result doesn’t look bad.

    #196526 quote
    GraHal
    Participant
    Master

    Would something like this be tradable?

    Looks like it well might, only sure way to find out is to Forward Test on Demo for a month?

    Longs may give trouble when market turns back  up? A couple of Longs are ‘going the wrong way’ for  longer than I be comfortable with, example attached.

    Thanks for sharing phoentzs; if I improve I’ll post on here.

    Long.jpg Long.jpg
    #196528 quote
    phoentzs
    Participant
    Master

    1 month unchanged? I might have rather re-optimized every week since I only have 200000 bars. If you have 1 million bars… can you please post the result? Do you think it is advisable to add a longer MA as a filter? In my opinion, the system then becomes too slow.

    #196529 quote
    phoentzs
    Participant
    Master

    Of course, you could also simply reduce the maximum SL. The 1% was set more intuitively.

    #196534 quote
    GraHal
    Participant
    Master

    The 1% was set more intuitively.

    Let’s try something, and it starts on my profile! 😉

    #196535 quote
    phoentzs
    Participant
    Master

    Oh yes. And how exactly? 😉

    #196536 quote
    PeterSt
    Participant
    Master

    It looks like I have to pass on this one, but it is not clear to me why.

    The below resembles what you showed in your first post. But I can’t find a way to show this curve other than using the $50 version which leads to 50 times more of everything. That is, device what you see for gain by 50 and it comes close to your results. But … and this is the thing … when I use the $1 contract then nothing resembles. This should mean that you use points etc. in there which relate to the contract size, also confirmed by your number of contracts (4) which don’t give a linear result when I make e.g. 1 of it. Less than one does not give a result at all, so I actually don’t understand what to do to get the same.

    Something else GraHal already said : the drawdown is not right. But not really the drawdown – merely the loss in one trade (2nd attachment sorted on performance). Thus this fact alone makes the result coincidental, also testified by the (in itself coincidental) other results I received over different periods.

    By means of the 3rd attachment (1M bars) I hope to show you how your result was about (haha) 100% over-optimised (see the June 23 mark). There too all values are 50x higher than I think what you used (an order is 750K against today’s EUR/USD).

    Thus : Mwah. 🙂

    GraHal thanked this post
    image_2022-07-01_135754650.png image_2022-07-01_135754650.png image_2022-07-01_140303206.png image_2022-07-01_140303206.png image_2022-07-01_141013456.png image_2022-07-01_141013456.png
    #196540 quote
    phoentzs
    Participant
    Master

    Well, with simple means, this code is used to trade the market swings. Optimized for one week, of course. If the settings still work the next day or even a week later, that would be sufficient. Could you maybe try on SP500 or other indices? I believe Forex is subject to different laws. If only because the SL is given as a percentage.

    #196541 quote
    phoentzs
    Participant
    Master

    What would you add to make it more robust?

    #196544 quote
    PeterSt
    Participant
    Master

    Could you maybe try on SP500 or other indices?

    That is what you looked at. 😉
    I also tried Tech100 (Nasdaq) which was an accident. More profit but again a huge DD the last month.
    Please notice that in my experience there is no way that another index works better on any random strategy (random is what is your strategy to me).

     

    What would you add to make it more robust?

    Maybe I don’t feel qualified to “teach” anything here ? But *if* I had to say something, I would say that there is no base that I can see. And well, then there is also nothing to expand on or change. This is a bit of “high flying” (blahblah) of course but if the idea is not there, then what to do (all right, you pointed out the market swings, which I don’t see 🙁 ).

    If a Stategy performs as poor in the past as I saw from this one, then usually there is nothing much to do about it. In this case one could attest that if the MA is made so long that hardly any trades occur, then those huge DD’s could me smoothed out (didn’t you see something along those lines yourself ?). But then the “scalping” would be less of that, right ?

     

    Optimized for one week, of course. If the settings still work the next day or even a week later, that would be sufficient.

    FWIW : That would not be my thinking. So it is difficult to discuss.

    #196547 quote
    phoentzs
    Participant
    Master

    Mmh, ok…could I politely ask what you think would be a base to build on?

    #196559 quote
    PeterSt
    Participant
    Master

    Haha, I scratched 4 versions of text because I all didn’t like what I had to say. But it would be something that is not depending on the shorter averages.

    As I said before (longer ago), I am not a guy of “signals”. It is all more technical stuff. In this case (and again) make your MA’s such that 10 times less trades occur. From there “do things” to earn what you want. … But you wouldn’t be scalping …

    And think like this (I think I told about that too, earlier on) :
    Suppose that your better entries will bring hardly any profit. But make it 10K for the nice talk. Technical appliances (which is programming) would turn that into 15-20K, would I be behind the keyboard. Better trailing, better limit entries, better matching, etc. But what do I tell really with this ?
    … That this important part allows for (for example) less trades or even less gain per trade, thus a theoretical less total gain, which I would earn back at the subjects in my previous sentence. Net it is better now because the more relaxed entry system will be inherently more robust (it is not stressing to meet very-market-depending conditions).

    And again I end with : you can do nothing with it. Still it is my answer because still it is how I “operate”. And just saying : would you feel like your idea is worth to expand on, or would I think that myself, then it would take me months (really !) to make something of it. Maybe it takes me months to finally ditch it.
    Somehow many people think this is easy. Well, it is far from that. Now that should be useful data. 🙂

    #196567 quote
    GraHal
    Participant
    Master

    how exactly?

    You didn’t pick up on my cryptic hint? 🙂

    #196568 quote
    phoentzs
    Participant
    Master

    It would of course be very easy, probably too easy, to find something at least remotely robust enough to make money using simple means in this time frame. Normally I also move in much larger time frames with my strategies. But the seconds range fascinates me. So I think, with a few indicators, something must be possible? After all, it also works in the H1. 😉 Apart from that, I still have no idea what exactly Peter means. A handful of strategies run with me as a portfolio in the 10s TF with quite good success. But, it’s all price action stuff… market open, breakout range, daily breakouts or even pattern trading (where the signal comes from H1 or higher). So all things where you expect some volume or momentum and the price is going at least a bit in the right direction… and that’s where the 10s time frame comes in… with a trail. Works… as long as the trail is set up well.

Viewing 15 posts - 1 through 15 (of 25 total)
  • You must be logged in to reply to this topic.

10s-Scalp-SP500 Does it work?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
phoentzs @phoentzs Participant
Summary

This topic contains 24 replies,
has 4 voices, and was last updated by robertogozzi
3 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/01/2022
Status: Active
Attachments: 6 files
Logo Logo
Loading...