|
Rean
 Veteran
 Posts: 105
Joined: 8/30/2013
Location: Johannesburg, South Africa
User Profile |
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?
[Edited by Rean on 10/21/2022 9:48 AM]
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
Yes, you can do that in a Quick Indicator...
EMA(25) + 5
or
EMA(25) - 5
Depending what offset direction you want.
|
|
Rean
 Veteran
 Posts: 105
Joined: 8/30/2013
Location: Johannesburg, South Africa
User Profile |
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
Attached file : SMA_offset.jpg (51KB - 106 downloads)
Attached file : SMA_offset.jpg (51KB - 107 downloads)
|
|
Rean
 Veteran
 Posts: 105
Joined: 8/30/2013
Location: Johannesburg, South Africa
User Profile |
Just to add to the description. The intention is to offset a moving average to the left or right.
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
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]
|
|
Rean
 Veteran
 Posts: 105
Joined: 8/30/2013
Location: Johannesburg, South Africa
User Profile |
"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.
[Edited by Rean on 10/25/2022 1:26 AM]
|
|
Barry Cohen
 Sage
      Posts: 6338
Joined: 1/19/2004
User Profile |
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.
|