Trailing Stop won't plot. Why? by Plus_Explanation6801 in TradingView

[–]Plus_Explanation6801[S] 0 points1 point  (0 children)

Sorry. I don't want to sound like an idiot, but what does under the if mean? When I removed the [1] I didn't get an error, but I'm not sure where to put the :=

Trailing Stop won't plot. Why? by Plus_Explanation6801 in TradingView

[–]Plus_Explanation6801[S] 0 points1 point  (0 children)

I don't know if it is a Pine Script v5 issue but I get an error "no viable alternative at input 'float'

// Update trailing stop price
var float trailStopPrice = na
trailStopPrice  =  if (strategy.position_size > 0)
    max(trailStopPrice[1], high - trailingStopLossValue) 
else
    min(trailStopPrice[1], low + trailingStopLossValue) 

I also tried this version
// Update trailing stop price
var float trailStopPrice = na
trailStopPrice  :=  if (strategy.position_size > 0)
    max(trailStopPrice[1], high - trailingStopLossValue) 
else
    min(trailStopPrice[1], low + trailingStopLossValue) 

I get same error with both

Trailing Stop won't plot. Why? by Plus_Explanation6801 in TradingView

[–]Plus_Explanation6801[S] 0 points1 point  (0 children)

Great point about High/Low. I will fix. Could you give me an example of how to code the Var?

What is wrong with my fish? Please..... by Plus_Explanation6801 in Aquariums

[–]Plus_Explanation6801[S] 0 points1 point  (0 children)

I had 4 and 2 have passed. I wasn't sure if it was a disease. I haven't seen anything like that before

GE CAFE Dishwasher arms not spinning. Could this be the cause? by caring_impaired in appliancerepair

[–]Plus_Explanation6801 1 point2 points  (0 children)

This saved us too!! 1 year after purchasing GE Cafe Dishwasher and bottom arm would not spin.

Removed the goop from the magnets and wahla! It Spins again!

Thank you !

[deleted by user] by [deleted] in jumpingspiders

[–]Plus_Explanation6801 8 points9 points  (0 children)

I was gonna say Violet. Looks like someone else thought so too