Price Change Code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #185746 quote
    abuanza
    Participant
    New

    Hi guys. I am after a code that buys 5 contracts every time the price drops <= 1% even before the daily candle closes. For example, if the FTSE100 opening price was 7500 then dropped to day lowest 7400 then closed at 7550. In this case the code should have bought 5 contracts when the price dropped to 7425 (1% drop from opening price), not waiting for the candle to close.

    Would appreciate your help!

    #185757 quote
    robertogozzi
    Moderator
    Master

    You have two options:

    1. use the MTF (Multiple Time Frame support) and use, as default TF, one that is as low as you need (1 minute or 1 second); strategies are ALWAYS executed when a candle closes, but being executed every minute is a great advantage compared to once a day; the drawback is that the data history is still 200K (or whatever elese), but it’s 200K 1-minute bars, not Daily bars!
      .
    2. when the daily candle closes place some pending orders (say5, or 10), one at 1% distance from each other, so that at any 1% drop they will enter a position; pending orders always last just 1 bar (in this case a whole day), so you can safely place them again and again each day.
    #185778 quote
    abuanza
    Participant
    New

    Thanks for your prompt reply. I am sorry but I didn’t quite understand the first option. Could you show some examples? Thanks

    #185789 quote
    robertogozzi
    Moderator
    Master

    You can find details here https://www.prorealcode.com/blog/learning/approach-multi-timeframe-trading-prorealtime/.

    You can also search the forum for MTF to be returned many links to code and examples.

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

Price Change Code


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
abuanza @abuanza Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
4 years, 1 month ago.

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