Scaling IN

Questions about MultiCharts and user contributed studies.
tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Scaling IN

Postby tradingest » 22 May 2020

Hi there,

I try to enter in more position while retracing the price but in my code only the firts one entering.
Why? The code below:

Code: Select all

if Low[0]<= FirstEntry and PosNum1 < 1 and MP = 0 then begin StopLongEntry = 1; PosNum1 = 1; SumPos = PosNum1; Buy ("Long1") PosNum1 contract this bar at close; end; if Low[0]<= SecondEntry and PosNum2 < 1 and MP = 1 //raggiunto il valore del secondo ingresso then begin PosNum2 = 1; SumPos = PosNum1 +PosNum2; Buy ("Long2") PosNum2 contract this bar at close; end;
The Second Entry should enter where appear the red arrow but don't enter. Why?
Image

Thanks in advance
Attachments
SecondEntry.jpg
(27.73 KiB) Not downloaded yet

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Scaling IN

Postby JoshM » 22 May 2020

Just to rule of an accidental wrong setting: did you allow the strategy, in the 'Strategy Properties' window, to scale into positions?

That setting is under 'Position Limits' and has radio buttons for 'when the order is generated by a different entry order' and 'regardless of the entry that generated the order'.

tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Re: Scaling IN

Postby tradingest » 22 May 2020

Just to rule of an accidental wrong setting: did you allow the strategy, in the 'Strategy Properties' window, to scale into positions?

That setting is under 'Position Limits' and has radio buttons for 'when the order is generated by a different entry order' and 'regardless of the entry that generated the order'.
Hi,

I set this. It's wonrg?

Image


Thanks
Attachments
ScalingIN.jpg
(24.64 KiB) Not downloaded yet

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Scaling IN

Postby JoshM » 24 May 2020

I think you need to set the 'Maximum shares/contracts per position' option from your image to a higher value than 1.

When that value is one, the first entry order also makes the market position get the maximum size. And so additional entries aren't filled.

I tested and that's how it works on my end. I don't see a problem with the code you shared, that seems correct. :)


Return to “MultiCharts”