Seeking Powerlanguage Building Block For Hard Exit

Read before posting.
WoutervanDongeren
Posts: 1
Joined: 20 Jun 2012
Has thanked: 1 time

Seeking Powerlanguage Building Block For Hard Exit

Postby WoutervanDongeren » 04 Aug 2012

Hello every one, fairly new to this Forum, and reading with great interest.

Build a strategy- completed the Entry part - and now looking to come up with a solution for the StopLoss part.

Let me take my Long Entry as an example......The Candle that triggers the Long Entry condition is not the Entry Candle.....the Entry Candle is the next following Candle.....( since my script says... IF....THEN......""Buy Next Bar At Market"".......)

And here arrises my difficulty......I would like to place a hard stop right under the Low of the Candle that triggers the Long Entry Condition........

Using the regular building blocks in the PL editor, all scripts react to the Long Entry candle,
and not to the candle before...the candle that triggers the Long Entry "Buy Next Bar at Market" script"...


Would anyone be so kind to assist me in this matter?
Thanks very much!!

Wouter

User avatar
TJ
Posts: 6580
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 970 times
Been thanked: 1907 times

Re: Seeking Powerlanguage Building Block For Hard Exit

Postby TJ » 11 Aug 2012

WoutervanDongeren wrote:Hello every one, fairly new to this Forum, and reading with great interest.

Build a strategy- completed the Entry part - and now looking to come up with a solution for the StopLoss part.

Let me take my Long Entry as an example......The Candle that triggers the Long Entry condition is not the Entry Candle.....the Entry Candle is the next following Candle.....( since my script says... IF....THEN......""Buy Next Bar At Market"".......)

And here arrises my difficulty......I would like to place a hard stop right under the Low of the Candle that triggers the Long Entry Condition........

Using the regular building blocks in the PL editor, all scripts react to the Long Entry candle,
and not to the candle before...the candle that triggers the Long Entry "Buy Next Bar at Market" script"...


Would anyone be so kind to assist me in this matter?
Thanks very much!!

Wouter


My suggestion would be to start with a flowchart.
You need to map out your logic flow before start coding.

Image


Return to “MultiCharts FAQ”