Hey Sir, can you explain what "Source Trailing Stop calculation" and "Source Trigger" are? i dont understand what these option do.
Damasta
⋅
@migm, Well the first is the source that is used to draw the Trailing-Stop line. The second is the source that triggers the signal when crossing the line, which is useful if you don't want it to trigger when you use signals on close of the bar only and use close for example. That way a short dip breaking the line wouldn't trigger the signal when close gets above again afterwards.
Sorry for my bad explanation, I hope it's understandable
LC01
⋅
this is very useful. Not only for the bot but for backtesting.
However, by adding this code to my simple script I get an error message "Add to Chart operation failed, reason: The script must have one study() or strategy() function call"
I'm new to pinescript, trying to learn step by step so I'd much appreciate some help :)
I believe there should be an exit() command in order to backtest with the trailing stop, right?
Here is my code, a simple EMA crossover.. I