logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
alsaad_1122  
#1 Posted : Sunday, June 27, 2021 5:16:25 PM(UTC)
alsaad_1122

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/22/2020(UTC)
Posts: 5
Location: jeddh

Thanks: 1 times

t1 = OscP( 12, 26 ); Cond1a = Cross ( t1, MACD() ); Cond1b = MACD() > -1 AND MACD() < 0; Cond1 = Cond1a AND Cond1b; Cond2 = MACD() > Signal() - .5; Cond3 = Cross( 0, t1 );

MS Support  
#2 Posted : Tuesday, June 29, 2021 2:41:10 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,929

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: alsaad_1122 Go to Quoted Post

t1 = OscP( 12, 26 ); Cond1a = Cross ( t1, MACD() ); Cond1b = MACD() > -1 AND MACD() < 0; Cond1 = Cond1a AND Cond1b; Cond2 = MACD() > Signal() - .5; Cond3 = Cross( 0, t1 );

Hi,

These would all be similar to variables in MetaStock. In order for the code to plot/execute something, the variables would need to be called in some fashion at the end of the formulas. Assuming the first variable is similar to our Price Oscillator, the function has additional criteria that must be added (I added Exponential and Percent, but other options could be used). I'm also unsure what the "Signal" function is but if it is a reference to the MACD Signal Line (which is a moving average of the MACD) it could be written as per below:

Code:
t1:=OscP(12,26,E,%);
Cond1a:=Cross(t1,MACD());
Cond1b:=MACD() > -1 AND MACD() < 0;
Cond1:=Cond1a AND Cond1b;
Cond2:=MACD() > Mov(MACD(),9,E) - .5;
Cond3:=Cross(0,t1);

alsaad_1122  
#3 Posted : Tuesday, June 29, 2021 10:27:15 PM(UTC)
alsaad_1122

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/22/2020(UTC)
Posts: 5
Location: jeddh

Thanks: 1 times

Thank you...creative

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.