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

Notification

Icon
Error

Options
Go to last post Go to first unread
jhmathisjr  
#1 Posted : Sunday, March 10, 2024 6:18:17 PM(UTC)
jhmathisjr

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2022(UTC)
Posts: 4
Location: VA

I was wondering if it's possible to use seperate functions to close out a test. As follows:

{Close position if 1st conditional function is true}

(C < O AND

C < MOV(C,10,S) AND

CCI(14) < 20 AND

O - C >= 2)

OR

{Else close position if 2nd conditional function is true}

(C < O AND

(Mov(C,10,S) < Ref(Mov(C,10,S), -1) AND

MACD() < MOV(MACD(), 9 , E))

MS Support  
#2 Posted : Monday, March 11, 2024 2:27:20 PM(UTC)
MS Support

Rank: Advanced Member

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

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

I was wondering if it's possible to use seperate functions to close out a test. As follows:

{Close position if 1st conditional function is true}

(C < O AND

C < MOV(C,10,S) AND

CCI(14) < 20 AND

O - C >= 2)

OR

{Else close position if 2nd conditional function is true}

(C < O AND

(Mov(C,10,S) < Ref(Mov(C,10,S), -1) AND

MACD() < MOV(MACD(), 9 , E))

Hello,

This should work fine as a sell order (although you have an extra parentheses before the first moving average in your "else" condition):

Code:
{Close position if 1st conditional function is true} 

(C < O AND C < MOV(C,10,S) AND CCI(14) < 20 AND O - C >= 2) 

OR 

{Else close position if 2nd conditional function is true} 

(C < O AND Mov(C,10,S) < Ref(Mov(C,10,S), -1) AND MACD() < MOV(MACD(), 9 , E))

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.