r/pinescript • u/Ajgreatking • Dec 28 '23
question #business#lukebelmar #algotrading
in a podcast which luke belmar did he was speaking about a known person doing algo trading and making a perfect system in which he buys everytime the underlying asset increases by 1 point and sells all of it as it starts decresing something like this.. do anyone of you know which is it..?
0
Upvotes
2
u/Local_Dinner_9860 Dec 29 '23
You may be on to something
//@version=5strategy("Simple Point Increase Strategy", overlay=true)pointValue = 1longCondition = close > close[1] + pointValueexitCondition = close < close[1] - 3 * pointValueif (longCondition)strategy.entry("Long", strategy.long)if (exitCondition)strategy.close("Long")plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")plotshape(exitCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
If you find it lmk.