I'm getting this error with this section of script - "line 186: mismatched input '=' expecting 'end of line without line continuation'". I am a novice at this, is anyone able to help/explain the issue? Cheers
one_unit = if (highest(lossincrs,lossbars)) = 1
na(yen_conversion) ? na :round((risk_accountrec/(sl_pips*yen_conversion))/lot_unit*pow(10,round))/pow(10,round)
else
na(yen_conversion) ? na :round((risk_account/(sl_pips*yen_conversion))/lot_unit*pow(10,round))/pow(10,round)
Use:
one_unit = if (highest(lossincrs,lossbars)) == 1
See:
https://www.tradingview.com/pine-script-docs/en/v4/language/Operators.html#comparison-operators
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.