High Frequency Micro Trading Strategy – AAPL

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #220713 quote
    ClaudioVidini
    Participant
    New

    Hi All, looking for a stepbystep / code for my First Strategy please..

    Buy Signal: When a stock’s price increases by 0.01% over the last 1 minute and its volume is greater than the average over the last 1 minute, buy the stock.
    Sell Signal: When a stock’s price decreases by 0.01% over the last 1 minute and its volume is greater than the average over the last 1 minute, sell the stock.
    Safety Net: If the strategy goes 1.00% below its inception, freeze trading for 15 minutes.

    thanks all.

    #220715 quote
    robertogozzi
    Moderator
    Master

    What TF will you be using?

    #220728 quote
    ClaudioVidini
    Participant
    New

    Hi,

    I’m looking to setup this same strategy over a few of the highest S&P stocks like AAPL.

    Can you clarify if this answers your question around TF please?

     

    Grazie mille

    #220738 quote
    PeterSt
    Participant
    Master

    Some times the answers are too obvious, which is similar to how questions may not be understood.

    The TimeFrame is about the bar length, and within the context of PRT coding, I would say you indicated that your TimeFrame is 1 minute. Hence :
    If you don’t want to know anything at an interval of faster than 1 minute, the TF you want to use is 1 minute.

    #220742 quote
    ClaudioVidini
    Participant
    New

    Nice explanation, thank you.

    Confirmed TF 1 minute 😉

    #220746 quote
    robertogozzi
    Moderator
    Master

    There you go:

    Lcond = (close > (close[1] * 1.0001)) AND (Volume > Volume[1])
    Scond = (close < (close[1] * 0.9999)) AND (Volume > Volume[1])
    IF Lcond AND Not LongOnMarket THEN
       BUY 1 Contract at Market
    ELSIF Scond AND Not ShortOnMarket THEN
       SELLSHORT 1 Contract at Market
    ENDIF

    as there’s no 1-minute average in a 1-minute TF, I compared the current volume against the previous one.

    #220774 quote
    ClaudioVidini
    Participant
    New

    Thank you Roberto,

    As this is my first trade on PRT. Could you point me in the right direction on how to execute the code please?

    Thanks again, really appreciated.

    #220783 quote
    robertogozzi
    Moderator
    Master

    Follow the steps on the attached pics:

    • Pic1:   click the highlighted tab
    • Pic2:   click the tab labelled NEW, while in Backtesting & Automatic Trading
    • Pic3:   enable Creation by Programming, then ERASE all the lines tyou can see in the programming editor
    • Pic4:   paste the code I posted, fill the data you need, then start the probacktest.

    the code will be temporarily saved, but to make sure it is definitely saved (on the ProRealTime servers), you will need to shut down the platform using the exit keys (any unexpected interruption will make your current modified code to be lost). To save it on your PC, you’ll have to export it.

    In this forum, on the PRT website and Youtube’s ProRealTime channels you will find many videos to start operating the platform.

    pic1.jpg pic1.jpg pic2.jpg pic2.jpg Pic3.jpg Pic3.jpg pic4.jpg pic4.jpg
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

High Frequency Micro Trading Strategy – AAPL


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/11/2023
Status: Active
Attachments: 4 files
Logo Logo
Loading...