Error

 Previous Topic Next Topic
 alsaad_1122 #1 Posted : Sunday, June 27, 2021 5:16:25 PM(UTC) Rank: NewbieGroups: Registered, Registered Users, SubscribersJoined: 4/22/2020(UTC)Posts: 5Location: jeddhThanks: 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 );
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 MS Support #2 Posted : Tuesday, June 29, 2021 2:41:10 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,741Thanks: 66 timesWas thanked: 146 time(s) in 142 post(s) Originally Posted by: alsaad_1122 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) Rank: NewbieGroups: Registered, Registered Users, SubscribersJoined: 4/22/2020(UTC)Posts: 5Location: jeddhThanks: 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.