SetProfitTarget Function

Questions about MultiCharts and user contributed studies.
Gann_Man
Posts: 85
Joined: 01 Jul 2007
Location: Missouri
Has thanked: 7 times
Been thanked: 2 times

SetProfitTarget Function

Postby Gann_Man » 22 Jul 2011

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;

User avatar
furytrader
Posts: 354
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 155 times
Been thanked: 217 times

Re: SetProfitTarget Function

Postby furytrader » 22 Jul 2011

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.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: SetProfitTarget Function

Postby TJ » 23 Jul 2011

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;
see post #3
viewtopic.php?f=16&t=6929

Gann_Man
Posts: 85
Joined: 01 Jul 2007
Location: Missouri
Has thanked: 7 times
Been thanked: 2 times

Re: SetProfitTarget Function

Postby Gann_Man » 23 Jul 2011

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;
see post #3
viewtopic.php?f=16&t=6929
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.


Return to “MultiCharts”