Reply

Problem setting Profit Target as a custom range

4 replies

LisbonTrader

Subscriber, bbp_participant, community, 5 replies.

Visit profile

8 years ago #113841

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.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #130977

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.

0

LisbonTrader

Subscriber, bbp_participant, community, 5 replies.

Visit profile

8 years ago #131010

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.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #131032

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #131057

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

0

Viewing 4 replies - 1 through 4 (of 4 total)