Please help me about get value in Timeframe 5 minute

#1
Hi

Please advice me. In timeframe 5 minute i want to check macd is slope up

In script below,please advice me What is the formular is true? because I write 2 method for compare but result of 2 Method is return value not same.

Method 1 :

TimeFrameSet(in5Minute);

In5MinMacd12_26Slopeup = LinRegSlope( MACD(12,26), 3 ) > 0 ;

TimeFrameRestore();


or


Method 2 :

TimeFrameSet(in5Minute);

In5minMacd12_26 = MACD(12,26);

TimeFrameRestore();


In5MinMacd12_26Slopeup = LinRegSlope(TimeFrameExpand(In5minMacd12_26,in5Minute) , 3 ) > 0 ;
 

bunti_k23

Well-Known Member
#2
bro me too looking for this thing ,i want to use slope of macd from daily charts on 10min charts ,i want to code this cond on 10min tf but unable it was repainting badly .also somewhere i read extremists comment that use of htf is not possible to code in buy sell signal for ltf...lets see is there any other thing to do this .one thing is coming in my mind is to compare the value macd like 1day macd = xx value of macd on 10 min charts by converting this value we can plot terms in buy sell condition this way we dont have to use timeframe func.i saw this conversion in galtsgulch's thread .
 

colion

Active Member
#3
Hi

Please advice me. In timeframe 5 minute i want to check macd is slope up

In script below,please advice me What is the formular is true? because I write 2 method for compare but result of 2 Method is return value not same.

Method 1 :

TimeFrameSet(in5Minute);

In5MinMacd12_26Slopeup = LinRegSlope( MACD(12,26), 3 ) > 0 ;

TimeFrameRestore();


or


Method 2 :

TimeFrameSet(in5Minute);

In5minMacd12_26 = MACD(12,26);

TimeFrameRestore();


In5MinMacd12_26Slopeup = LinRegSlope(TimeFrameExpand(In5minMacd12_26,in5Minute) , 3 ) > 0 ;
Linear regression slope is not necessarily the slope of the MACD. Use ROC( MACD, period )
 

Similar threads