OmniTrader Forum
-
OmniTrader General Discussion
How do I offset a Moving Average |
^ Top | ||
Rean![]() Posts: 105 Joined: 8/30/2013 Location: Johannesburg, South Africa ![]() | Hi. I want to offset a MA (or EMA) by 5 points. How does one do this with Omnitrader? Can it be done as a quick indicator? | |
^ Top | ||
Barry Cohen![]() Posts: 6338 Joined: 1/19/2004 ![]() | Yes, you can do that in a Quick Indicator... EMA(25) + 5 or EMA(25) - 5 Depending what offset direction you want. | |
^ Top | ||
Rean![]() Posts: 105 Joined: 8/30/2013 Location: Johannesburg, South Africa ![]() | Thanks Barry I tried it but it's not working. See the attached snippet. The bottom red SMA is the SMA(20), the top is SMA(20)+5. This is what the quick indicated text file looks like: #Indicator Dim fValue As Single fValue = SMA(20)+5 PlotPrice("Value", fValue) Return fValue ![]() ![]() | |
^ Top | ||
Rean![]() Posts: 105 Joined: 8/30/2013 Location: Johannesburg, South Africa ![]() | Just to add to the description. The intention is to offset a moving average to the left or right. | |
^ Top | ||
Barry Cohen![]() Posts: 6338 Joined: 1/19/2004 ![]() | Ok so you mean offset left/right, not up/down? Then what do you mean by 5 points? Maybe try this instead... EMA(25)[5] | |
^ Top | ||
Rean![]() Posts: 105 Joined: 8/30/2013 Location: Johannesburg, South Africa ![]() | "Points" is a wrong choice of word from me. I want to shift the MA by 5 positions to the front (or back). It's a standard feature in most charting platforms such as MT4, Tradingview or cTrader. I tried the brackets and although it does seem to offset the MA, it still does not "project" it beyond the last candle. Going the other direction ([-5]) just does not yield anything at all, nothing seems to happen, and the indicator does not appear. And when you try to edit the Quick Indicator afterwards it messes things up by placing the indicator in a New Pane as opposed to just continuing in the Plot Price Pane. | |
^ Top | ||
Barry Cohen![]() Posts: 6338 Joined: 1/19/2004 ![]() | There was an issue with editing Quick Indicators, but that was fixed in PR2K, so make sure you are updated. Shifting an indicator the other direction is not possible that I know of nor is projecting an indicator beyond the current bar, but I'll make a feature request about it. |