Trying to build a simple strategy and test it

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

    Hi Guys,

     

    I would like to build a simple strategy and test it…I would like to test a moving price average by percentage every 3min to check if the percentage is higher then 0.3%…

     

    If the percentage is high for going UP I will like a BUY position, if is higher for going DOWN I will like a SELL position.

     

    Basically follow the momentum trade.

     

    I attached here my CODE and a print screen and I don’t understand why when I backtested looks I always have gains…also when I change the STOP or LIMIT PROFIT to HIGHER I don’t get any results.

    also with more than 3 days of data doesn’t seem to work ..I would like to test this strategy on 1-year data.

     

    Thanks,

    Lucian

     

     

    CODE:

    maxPercentage = 0.3
    
    
    movingPercetange = (close - close[1]) / close * 100
    
    
    IF movingPercetange >= maxPercentage THEN
    IF movingPercetange > 0 THEN
    BUY 1 SHARE AT MARKET
    ELSE
    SELL 1 SHARE AT MARKET
    ENDIF
    ENDIF
    //Stop && Limit
    SET STOP LOSS 30
    SET TARGET PROFIT 10
    
    Screenshot-2020-05-18-at-18.08.00.png Screenshot-2020-05-18-at-18.08.00.png
    #132187 quote
    GraHal
    Participant
    Master

    with more than 3 days of data doesn’t seem to work

    Attached over 1000 Daily bars

    unu.jpg unu.jpg
    #133816 quote
    unutoiul
    Participant
    New

    I want to backend tested every 3 min. for 1 year at least is that possible using IG and pro real code?

    #133822 quote
    nonetheless
    Participant
    Master

    With PRT Premium, a 3 minute chart can load just over 1 year of data (200k units). But if you’re on standard PRT you can only get half that (100k).

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

Trying to build a simple strategy and test it


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
unutoiul @unutoiul Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by nonetheless
5 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/18/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...