Hi,
How would I code the following please?
On the bar that the BUY is triggered, calculate x = (close-open).
Then make the pprofit = x.
Thanks.
Hi Real Pro
With such tight profit range it look like youa re coding a scalper?
The bar the trade was opened can be calculated using (barindex-tradeindex). Thus you can use something like;
TriggerBar = (barindex-tradeindex)
TriggerRange = ABS(Close[TriggerBar] – Open[TriggerBar])
Set Target pProfit = TriggerRange
Hi Juan, thanks. I’m using on 5 minute bars, so not really scalping as such. The trigger bar is a big breakout bar.
I copy/pasted as presented above and it gave me an error. Does it require some rejigging?