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

Notification

Icon
Error

Options
Go to last post Go to first unread
theAnonymous  
#1 Posted : Wednesday, March 2, 2011 11:05:30 AM(UTC)
theAnonymous

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/27/2011(UTC)
Posts: 4

how do i do the following? 1) get the program to recognise that my selected indicators are in an uptrend (compare prev day with today) 2) compare among all indicators to see if at least 3 out of 4 (for example) are in an uptrend 3) draw the buy arrow and exit short if it's true (and get the simulator to 'buy', if it's not automatically done). 4) get the program to recognise that my selected indicators are in a downtrend (compare prev day with today) 5) compare among all indicators to see if at least 3 out of 4 are in a downtrend 6) draw the buy exit and short arrow if it's true (and get the simulator to 'sell', if it's not automatically done). thanks.
jjstein  
#2 Posted : Wednesday, March 2, 2011 11:25:37 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
>>how do i do the following?

You haven't listed the indicator code, so here's a generic example:

MyIndicatorUptrend
x1:=If({1st indicator},1,0);
x2:=If({2nd indicator},1,0);
x3:=If({3rd indicator},1,0);
x4:=If({4th indicator},1,0);

x1+x2+x3+x4

Something similar for a downtrend.

Use an Expert to draw the buy & sell arrows:
Buy: Fml("MyIndicatorUptrend")>=3;
Sell: Fml("MyIndicatorDowntrend")>=3;

Something similar for the System Tester.

theAnonymous  
#3 Posted : Wednesday, March 2, 2011 11:55:59 AM(UTC)
theAnonymous

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/27/2011(UTC)
Posts: 4

jjstein wrote:
>>how do i do the following?

You haven't listed the indicator code, so here's a generic example:

MyIndicatorUptrend
x1:=If({1st indicator},1,0);
x2:=If({2nd indicator},1,0);
x3:=If({3rd indicator},1,0);
x4:=If({4th indicator},1,0);

x1+x2+x3+x4

Something similar for a downtrend.

Use an Expert to draw the buy & sell arrows:
Buy:  Fml("MyIndicatorUptrend")>=3;
Sell:  Fml("MyIndicatorDowntrend")>=3;

Something similar for the System Tester.

thanks for your reply. uh, im looking at STO, RSI, Williams and MACD, probably others too. but i wanna get the basics of writing the code right first. how do i... 1) differentiate between the different lines on STO and MACD? 2) ensure that it returns a true for the if statement (for uptrend) if and only if one line is below another? 3) how do i compare and see if the indicators are showing an uptrend or down? thanks again.
jjstein  
#4 Posted : Wednesday, March 2, 2011 1:41:17 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
I think you have some learning to do...

Look at some of the examples included in the Indicator list, in the manual, and online.

You're going to have to write your own indicators, plot them, change the code and see the effects. There's no shortcut to some Trial & Error experience.

If you post specific indicator code which is giving you a problem, you'll find help here.

Users browsing this topic
Guest (Hidden)
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.