简体   繁体   中英

How to get the highest and lowest points of the previous candle of the admission price

I have a problem. I want to put stop loss and profit on the highest or lowest point of the candle chart before the entry price. Please help me, thank you

low_bar_before_entry = ta.valuewhen( "insert the name of the entry bar" , low[1], 0)

if the entry bar has a name just insert it , or if it has a condition like for example ta.corssover(high, ta.ema(20))

just insert the name or the condition and you will get the value of the low of the previous bar , and it will remain fixed until the condition is met again in the future. same goes with previous high

High_bar_before_entry = ta.valuewhen( "insert the name of the entry bar" , high[1], 0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM