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.
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.
You must be logged in to reply to this topic.