Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

• ## Welcome Guests

Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

# Coding Problem

## Recommended Posts

I am having problems finding new highs or lows when the macd crosses under 0 line.

It seems to plot with cross above zero line. I am trying to reset the time with cross overs of zeroline. With cross over it needs to reset the time and from there start finding new higher highs and lows etc.

Any help would be much appreciated.

Thanks

{Start of code_____EasyLanguage__________________________________}

var: HH(0), LL(0),TimeOK(false),start(0),var10(0);

{"Macd Added"____Need to reset time or Start as macd crosses over 0 line-from Data2--Then Reset highs and lows and start looking from there for new Highs Lows from new start time____________________}

inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ;

variables: var0( 0 ), var1( 0 ), var2( 0 ) ;

var0 = MACD ( Close , FastLength , SlowLength ) ;

var1 = XAverage( var0, MACDLength ) ;

var2 = var0 - var1 ;

condition1 = var0 {data2 }crosses over 0 {data2} ;

if condition1 then begin

var10=time_s;

var10=time;

start=var10 ;

end;

condition2 = var0 crosses under 0 ;

if condition2 then begin

var10=time_s;

{start=time ;}

start=var10 ;

var10=time;

end;

{High Low find from Time reset }

TimeOK = time >= start ;

if TimeOK = false then begin

HH = high;

LL = low;

noplot(1) ;

noplot(2);

end else begin

if high > HH Then begin

HH = high;

plot1(HH,"HH",red );

end;

if Low < LL then begin

LL = low;

plot2(LL,"LL",cyan );

end;

end;

## Create an account

Register a new account

• 1
• 2600
• 703
• 756
• 18
• ### Posts

• Ethereum Price Analysis – April 25   ETHUSD Medium-term Trend: Bullish   Resistance: \$680, \$670, \$660 Support: \$620, \$630, \$640   Yesterday, April 24, Ethereum price was in a bullish market and reached the resistance level at \$700. The bulls have attempted breaking the resistance level without success. The reason for this is that the resistance level was previously a strong support level that was broken by the bears on March 13, 2018. Today, the asset is trading at \$644.55 at the time of writing.   Nevertheless, in the weekly chart, the ETHUSD pair traded up to \$709, but was resisted by the bears. The price fell to the \$640 low. However, although the price has fallen as per the indicators and price action; the overall trend is bullish. In the weekly chart, the MACD line and the signal line are below the zero line, indicating that the market is bearish.   The 12-day EMA is above the 26-day one and are below the price, indicating that the bullish trend is ongoing.   ETHUSD Short-term trend: Ranging n the daily chart, the price is in a range bound movement. Ethereum was ranging at the \$700 resistance level. At \$670, the bulls took the price to the resistance zone and were resisted by the bulls at \$710. Then there was a pullback to the \$640 low when the market went into a range bound movement. The views and opinions expressed here do not reflect that of CryptoGlobe.com and do not constitute financial advice. Always do your own research.
• \$SIG (SIG) Signet Jewelers stock bottom breakout watch,

analysis http://chart.st/SIG

• This is NOT about “ungoverned” internet at all
http://abcnews.go.com/International/age-cyber-warfare-ungoverned-internet-poses-threats-infrastructure/story?id=53276814   This is ? https://www.oftwominds.com/blogapr18/data-influence4-18.html
• \$UVE (UVE) Universal Insurance stock narrow range breakout watch,

analysis http://chart.st/UVE

• \$INFN (INFN) Infinera stock strong day w/ top of range breakout watch,

analysis http://chart.st/INFN

×