John Crowley![]() Member Posts: 8 Joined: 6/17/2016 ![]() | I’m trying to code a specific type of trailing stop. I have OT Pro. It’s a trailing stop but requires certain reference points The first reference point is the last pivot low Using WaveTrader which has its own stop level that gives me the last pivot low value WT_LL (0.7,14,0), this is the dotted red line in the chart as an example The other reference point is the value of the SMA(30) at the point of the last pivot low, as defined by the WT_LL What I want from the stop is to initially set a stop loss at the last pivot low as a starting point, if the last pivot low is below the sma 30 If the SMA 30 is below the last pivot low, the initial stop loss should be 1% below the 30sma The stop I want to trail, based on the next pivot low So the next pivot low should raise the stop according to the above. Ie the lower of the pivot low or 1% below the SMA(30) if the SMA is lower than the pivot It shouldn’t trail the SMA. It should only trail when the pivot low changes hopefully the attached explains what I'm trying to do Can anybody could help with this? [Edited by John Crowley on 6/18/2016 2:04 AM] ![]() |