When you post codes without code tags, they look like ordinary text.
If your post is long and intertwined with codes and texts, the code will blend in with your message, making it difficult to read (and comprehend). If you are asking for help, you would want to make it as easy as possible for people to help you, including making your code easy to read.
Untagged codes look like this: everything is intertwined in a confused mess
can someone help me with this code? it is not doing what I want. It compiles and plots
but does not give correct value.
Function for DMI Oscillator;
inputs: Price( Close ), Length( 20 ), ConfirmBars( 1 ), //MA
FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ; //MACD
variables: var0( 0 ), //MA
var1( 0 ), var2( 0 ) ; //MACD
var1 = MACD( Close, FastLength, SlowLength ) ;
var2 = XAverage( var1, MACDLength ) ;
ps. Oscillator value should be above zero line when +DMI is above -DMI.
You cannot tell the difference between the code and your message.
You can show the codes separately in a Code Box, with formatting, thus making reading easier.
Tagged code looks like this -- the script is enclosed in a box:
Code: Select all
Inputs:
Price( Close ), Length( 20 ), ConfirmBars( 1 ), //MA
FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ; //MACD
Variables:
MA( 0 ) , //MA
MA.CD( 0 ) ; //MACD
MA.CD = MACD( Close, FastLength, SlowLength ) ;
MA = XAverage( var1, MACDLength ) ;