sorry for my English writing ... but I wanted to know if you can stop a trendline after an input. I tried to write the following code but it does not work. How can you do?
if(MarketPosition= -1) then begin
if BarsSinceEntry=1 then
tl_setend(tlUP,date[0],time[0],entryprice);
end;
Regards
Mauro
End tl after entry .. is possible ?
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: End tl after entry .. is possible ?
You have to describe your problem in more detail.sorry for my English writing ... but I wanted to know if you can stop a trendline after an input. I tried to write the following code but it does not work. How can you do?
if(MarketPosition= -1) then begin
if BarsSinceEntry=1 then
tl_setend(tlUP,date[0],time[0],entryprice);
end;
Regards
Mauro
What do you mean by "...but it does not work"?
At the minimum, you have to draw a diagram to illustrate what you want to do,
and what is the stumbling block?
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: End TrendLine after entry .. is possible ?
ok .. thanks TJ .. let me explain better ....in attached, I send an image of the chart and explanations of what I would do.
That is, end the trendline after making an entrance Long or Short.
The code I wrote is:
...but it does not work, in the sense that even after making an 'entry, the trendline is not terminated.
Is it possible do it?
Regards
Mauro
That is, end the trendline after making an entrance Long or Short.
The code I wrote is:
Code: Select all
if(MarketPosition= -1) then begin
if BarsSinceEntry=1 then
tl_setend(tlUP,date[0],time[0],entryprice);
end;
Is it possible do it?
Regards
Mauro
- Attachments
-
- CutTrendLine.JPG
- (67.6 KiB) Downloaded 389 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: End TrendLine after entry .. is possible ?
If the trend line should also be extended after making a new enter long trade, checking for just `MarketPosition = -1` is not sufficient (since that will only check for short).That is, end the trendline after making an entrance Long or Short.
The code I wrote is:Code: Select all
if(MarketPosition= -1) then begin
if BarsSinceEntry=1 then
tl_setend(tlUP,date[0],time[0],entryprice);
end;
I would adjust the above code snippet to:
Code: Select all
if (MarketPosition(0) <> 0) and (BarsSinceEntry(1) = 1) then begin
TL_SetEnd(tlUP, Date[0], Time[0], EntryPrice(1));
end;
Re: End tl after entry .. is possible ?
Thanks JoshM,
letting loose the code that I wrote, I would like to know if there is a way to stop/break the trendline just made an 'entry. (see the attached image file to the previous post)
thanks
Regards
Mauro
letting loose the code that I wrote, I would like to know if there is a way to stop/break the trendline just made an 'entry. (see the attached image file to the previous post)
thanks
Regards
Mauro