Programming error with target and loss in percentage?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #106744 quote
    f1_maik
    Participant
    Junior

    Hello.

    A little question, how is that possible? Where is the mistake?

    This is what I wanted to program.

    I open a position at 09.00 o’clock and close the position at 17.00 o’clock.

    The average of a should be greater than the average of b.

    The SL is at 1%, the TP is at 1.5%.

     

    TD =  Opendayofweek = 1 or Opendayofweek = 2 or Opendayofweek = 3 or Opendayofweek = 4 or Opendayofweek = 5
    TT =  time = 090000
    
    c1 = Exponentialaverage [1] (close)
    c2 = Exponentialaverage [2] (close)
    
    IF  TD and TT then
    IF  c1 > c2 then
    sellshort at market
    Endif
    Endif
    
    IF shortonmarket and time = 170000 then
    exitshort at market
    endif
    
    
    set stop %loss 1
    set target %profit 1.5

     

    Applied to the Dax I have the following results. See screenshot. In the evaluation, gains of over 700 points, sometimes 900 points are displayed. Which is actually not possible, with TP of 1.5%.

    What have I done wrong?

    lg maik

    Screenshot_1-1.png Screenshot_1-1.png
    #106747 quote
    Vonasi
    Moderator
    Master

    Have you got tick by tick turned on?

    #106760 quote
    f1_maik
    Participant
    Junior

    Yes I have

    See all attached

    Screenshot_2-1.png Screenshot_2-1.png
    #106764 quote
    Vonasi
    Moderator
    Master

    I get the attached on DAX 1 hour chart.

    Screenshot_29-1.png Screenshot_29-1.png
    #106766 quote
    Vonasi
    Moderator
    Master

    f1_maik – Welcome to the forums. I see that this is your first topic and posts. There are some basic forum rules – one of which is to give your topics meaningful titles otherwise we just end up with thousands of ‘Can you help?’ or ‘Programming error’ topics. Your title has been edited to something more meaningful. please try to use better topic titles for future topics. 🙂

    f1_maik thanked this post
    #108293 quote
    f1_maik
    Participant
    Junior

    Thank you for pointing that out. I will note it.

    #108312 quote
    Nicolas
    Keymaster
    Master

    I think that’s a rounding issue with contract of 5€/point. Try with DAX 1€, like Vonasi did.

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

Programming error with target and loss in percentage?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
f1_maik @f1_maik Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/07/2019
Status: Active
Attachments: 3 files
Logo Logo
Loading...