Not logged in
Viewing 5 posts - 1 through 5 (of 5 total)

Forums>AlgoWizard / EA Wizard>Application Support>Problem setting Profit Target as a custom range

  • #113841 |
    Participant
    5 Posts

    Hello.

     

    I’m using a formula to get a dynamic pip amount, and I set it on “Custom range” at the “Profit Target Dialog”. I’ve done many testing and I know that my formula is correct and that it returns a good integer for the pip value. The problem is that the EA Wizard uses my pip value as it would be a real pip value, which causes that an exorbitant Profit target is set instead.

     

    I know this behaviour is wrong because when the profit target is a range in pips, the expected value is a pip amount as an integer, for example 20, and not the real pip value like 0.0020. This can be easily ilustrated when you choose the option “Use from variable”. What you set on the variable, in this example would be 20.

     

    I’ve checked the code and I think I know what’s missing. The thing is that if I set an variable as the Profit Target, on the code I get the “variable * getPointCoef(orderMagicNumber)” and when I use a Custom range I do not get that multiplication. I’ve manually edited the code and added this multiplication to my formula and I finally got a correct Profit target.

     

    This is a bug. Maybe you can fix it? Because if I do a slight change and generate the code again, I’ll loose all the code modifications I did.

     

    Thank you.

    #130977
    Moderator
    1559 Posts

    Could you attach your SQW file so I can see how you define PT? You can do it in Private Forum or send an email to support too.

    #131010
    Participant
    5 Posts

    Hello.

     

    You don’t really need the SQW because it’s very easy to replicate the problem. Anyway I’ve created a simple strategy that illustrates the problem clearly and attached it.

     

    Notice how I set both Profit Target (for long and short) in different ways, but that should bring the exact same result.

    Now check the code and see how both are implemented so differently.

     

    The getPointCoef function is missing if you use a “Custom range”.

     

    Thank you.

    Attachments in this forum are visible only for registered users.
    #131032
    Moderator
    1559 Posts

    Ok, I see I will look at it and let you know

    #131057
    Moderator
    1559 Posts

    When you use “Custom Range” you need to use ConvertToRealPips ( PTPips +/- offset )

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.