Swing Trading Script Idea

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

    Hello everyone,

    I am new here. I have a script in mind, and wanted to check if this is possible with ProRealTime? I’d appreciate thoughts/feedbacks on this.

    • Manually enter list of stocks
    • Breakout – the price is breaks ATH on higher volume
    • The volume is 150% > volume (50)
    • Weekly EMA > 13
    • Enter long
    • On breakout buy 50% (stop buy order)
    • If price goes up 1%, buy 25% (stop buy order)
    • If price goes up 1% more, buy 25% more (stop buy order)
    • If Price falls down below ATH then sell 100%
    • Sell 1/3 if close of day breaches 8 day EMA for the second time within 3 days
    • Sell 100% if below 21 day EMA
    • If the price goes back up to 21 EMA next day then buy back 100% of stock again
    • If the price goes down below 21 EMA then sell 100% again

    I have zero scripting experience, and would appreciate expert feedback before I hire a freelancer/contractor to help script this.

    Thanks,

    Ammar.

    #142225 quote
    ammartr
    Participant
    New

    Also, I’d appreciate thoughts what would be a fair price to pay for a script like this? Apologies if I am asking this question in the wrong place.

    #142226 quote
    robertogozzi
    Moderator
    Master

    The answer is NO, just because of your first requirement “Manually enter list of stocks“, which is not possible.

    Whenever you run a strategy you have to manually choose only ONE instrument to trade. To change it you have to stop your strategy, then change instrument on your chart, then restart your strategy again.

    Moreover, though you did not require to sell different percentages, ONLY 100% can be closed. Currently partial closing of positions is not supported by the broker (you still can do that while backtesting).

    #142230 quote
    ammartr
    Participant
    New

    Dear Robert,

    What if I apply the strategy to multiple instruments? At the start of the week, I identify twenty stocks that are close to breakout ATHs. I initiate the strategy for all 20 of them simultaneously.

    Regarding partial closing, is that true for ALL brokers?

    Apologies if questions are dumb — I am completely new to the concept of automated trading systems.

    #142234 quote
    robertogozzi
    Moderator
    Master

    Autotrating is currently supported only by IG, so…. by ALL brokers!

    Yes, you can have 20 copies oof the same strategy and run all of them from 20 different charts (or one chart, simply changing instrument name each time). You’ll have to do this each week.

    #142242 quote
    ammartr
    Participant
    New

    Is there no creative workaround for the partial closing? Let’s say there is 100 shares, I’d want to sell 33 of them if one criteria is met. You are saying this isn’t possible? I will have to sell ALL 100 shares?

    #142247 quote
    robertogozzi
    Moderator
    Master

    Yes, all of them.

    #142260 quote
    Dow Jones
    Participant
    Veteran

    workaround for the partial closing?

    Workaround probably is possible, that’s you need to have 2 strategies collated and apply on same instrument. Technically it is like 2 strategies with different exit conditions.

    For example,

    You have Stock A, Strategy 1 will manage 33 stocks, Strategy 2 will manage 67 stocks.

     

    • Sell 1/3 if close of day breaches 8 day EMA for the second time within 3 days -> Strategy 1, sell it, Strategy 2, do nothing
    • Sell 100% if below 21 day EMA -> Strategy 1, nothing to do, Strategy 2, sell it

     

    From here, you can also see what is the requirement for Strategy 2 that manage the 67 stocks when Strategy 1 achieved the condition. Whether to stay on the same stop loss or move up the stop loss.

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

Swing Trading Script Idea


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ammartr @ammartr Participant
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by Dow Jones
5 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/21/2020
Status: Active
Attachments: No files
Logo Logo
Loading...