Quote:
|
Originally Posted by autumnleaves
I would like to add extra signals from EASY (see Malone EASY document) to Phoenix. When I try to add the Price Action Channel, the result is exclusively sell transactions. Can you suggest why this might be happening? See the code below.
Perhaps these signals could be included in Phoenix 6.
bool BuySignal6=false, SellSignal6=false;
double HighPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_HIG H,0);
double LowPAC1 = iMA(NULL,0,P_PACPer,P_PACShift,MODE_SMMA,PRICE_LOW ,0);
double haClose1 = (PRICE_OPEN + PRICE_HIGH + PRICE_LOW + PRICE_CLOSE)*(0.25);
if(U_UseSig6)
{
if(haClose1 > HighPAC1) {BuySignal6 = true;}
if(haClose1 < LowPAC1) {SellSignal6 = true;}
}
else
{
SellSignal6=true;
BuySignal6 =true;
|
double haClose1 = (PRICE_OPEN + PRICE_HIGH + PRICE_LOW + PRICE_CLOSE)*(0.25);
Constant Value Description
PRICE_CLOSE 0 Close price.
PRICE_OPEN 1 Open price.
PRICE_HIGH 2 High price.
PRICE_LOW 3 Low price.
What this line of code does is to add the numberss 0, 1, 2, and 3 together then divide by 4 (essentially) giving an answer of 1.5.
Your code would give a sell as long as the currency is below 1.5000
PRICE_OPEN for example is a constant equal to 1.
I will post now and amend it in a little while when I have fix for you.
This works and produces buys and sells. It uses the open high low and close of the latest period.
Quote:
double haClose1 = (Open[0] + High[0] + Low[0] + Close[0])*(0.25);
|