Anybody else having problems with the "SetProfitTarget" function?
{profit target code snippet}
variable: profitTarget(0), targetPrice(0);
{The profit target function is "NOT" 100% accurate "ALL" of the time}
SetProfitTarget(profitTarget);
{This profit target code is 100% accurate "ALL" of the time}
If MarketPosition < 0 Then targetPrice = EntryPrice - profitTarget / BigPointValue;
If MarketPosition > 0 Then targetPrice = EntryPrice + profitTarget / BigPointValue;
SetProfitTarget Function
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: SetProfitTarget Function
Can you give an example where it's not accurate? I've used it both in backtesting and in real-time trading and it's always worked for me. I don't do automated trading though, but in terms of showing at which price I should exit the market, it's worked just fine.
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: SetProfitTarget Function
see post #3Anybody else having problems with the "SetProfitTarget" function?
{profit target code snippet}
variable: profitTarget(0), targetPrice(0);
{The profit target function is "NOT" 100% accurate "ALL" of the time}
SetProfitTarget(profitTarget);
{This profit target code is 100% accurate "ALL" of the time}
If MarketPosition < 0 Then targetPrice = EntryPrice - profitTarget / BigPointValue;
If MarketPosition > 0 Then targetPrice = EntryPrice + profitTarget / BigPointValue;
viewtopic.php?f=16&t=6929
-
- Posts: 85
- Joined: 01 Jul 2007
- Location: Missouri
- Has thanked: 7 times
- Been thanked: 2 times
Re: SetProfitTarget Function
Thanks TJ, I DID have SetProfitTarget nested which was probably causing the problems. Can't verify for sure yet because QuoteManager deleted ALL of my tick data from the database. I did a Symbol Mapping of chart symbol ES #F to broker symbol ESU1 which caused my entire ES #F tick history to be deleted.see post #3Anybody else having problems with the "SetProfitTarget" function?
{profit target code snippet}
variable: profitTarget(0), targetPrice(0);
{The profit target function is "NOT" 100% accurate "ALL" of the time}
SetProfitTarget(profitTarget);
{This profit target code is 100% accurate "ALL" of the time}
If MarketPosition < 0 Then targetPrice = EntryPrice - profitTarget / BigPointValue;
If MarketPosition > 0 Then targetPrice = EntryPrice + profitTarget / BigPointValue;
viewtopic.php?f=16&t=6929