SetProfitTarget and SetStopLoss

Questions about MultiCharts and user contributed studies.
Wally_AD
Posts: 47
Joined: 28 Jan 2014
Has thanked: 8 times
Been thanked: 7 times

SetProfitTarget and SetStopLoss

Postby Wally_AD » 26 Mar 2014

Dear all,

I use the following code fragment.
If AvgTrueRange(atrlen) > atgr * 0.1 Then HighVotality = true else HighVotality = false;

SetStopPosition;
If HighVotality Then
setdollartrailing( TrlStp * BigPointValue)
else begin
SetProfitTarget(TargPts * BigPointValue );
SetStopLoss(SLPTs * BigPointValue);
end;
Is there anything wrong with it?

Testing on the charts results that orders are shown without previously entering a trade.
Although MP=0 the SetProfitTarget and SetStopLoss orders were executed. Shouldn't they depend on MP?

I would like to get rid of them in the chart. How ?

With the Portfolio Backtester and a lot of trace outputs into a file I cannot see these orders.


regards
Ulrich

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: SetProfitTarget and SetStopLoss

Postby Andrew MultiCharts » 27 Mar 2014

Hello Wally_AD,

Wally_AD
Posts: 47
Joined: 28 Jan 2014
Has thanked: 8 times
Been thanked: 7 times

Re: SetProfitTarget and SetStopLoss

Postby Wally_AD » 27 Mar 2014

Hello Andrew,

"Assign Initial Market Position At Broker feature"

I do not use this. I was even not aware of it.

What mode of auto-trading is used?

I use SA mode

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: SetProfitTarget and SetStopLoss

Postby Andrew MultiCharts » 28 Mar 2014

When it happens, what are the values of the following columns in order and Position Tracker on the Strategy Positions tab?
  • Strategy Position
  • Broker Position
  • Position Match

Wally_AD
Posts: 47
Joined: 28 Jan 2014
Has thanked: 8 times
Been thanked: 7 times

Re: SetProfitTarget and SetStopLoss

Postby Wally_AD » 28 Mar 2014

As I remember all positions were zero. But I can't prove this right now.

I try to reproduce this during the weekend.
At present times I do no see the effect.

regards

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: SetProfitTarget and SetStopLoss

Postby Andrew MultiCharts » 28 Mar 2014

If the issue still persists, please come to our live chat during working hours (6:30 am – 3:00 pm EST) to let our operators connect to your computer remotely and help you.


Return to “MultiCharts”