Hi hope someone can help i have never used icustom indicator before
the indicator generates 3 variables in data window
bullentry
Value 2 - StopLoss value ie 0.9628
Value 3 - TakeProfit value ie 0.9698
bearentry
Value 5 - Stop Loss value ie 0.9698
Value 6 - TakeProfit value ie 0.9628
i am trying to test for Signal ie is current candle showing "bullentry" or "bearentry" and pass the variable value 2 and value 3 inthe case of "bull entry" to StopLossand take TakeProfit values or if "bearentry" values 5 and 6 respectivly
to use for trade entry
here is what i have written so far but does not work
//Long
string Signal=(iCustom(NULL,NULL,"ragstoriches",1,0));
double StopLoss=(iCustom(NULL,NULL,"ragstorichesf",2,0));
double TakeProfit=(iCustom(NULL,NULL,"ragstoriches",3,0));
if (Signal ="bullentry")
{
if (StopLoss > 0) stop = NormalizeDouble(Ask - (StopLoss * Point), Digits);
type = OP_BUY;
price = Ask;
SendTrade = true;
}
//Short
string Signal=(iCustom(NULL,NULL,"ragstoriches",4,0));
double StopLoss=(iCustom(NULL,NULL,"ragstorichesf",5,0));
double TakeProfit=(iCustom(NULL,NULL,"ragstoriches",6,0));
if (Signal ="bearentry")
{
if (TakeProfit > 0) take = NormalizeDouble(Bid - (TakeProfit * Point), Digits);
if (StopLoss > 0) stop = NormalizeDouble(Bid + (StopLoss * Point), Digits);
type = OP_SELL;
price = Bid;
SendTrade = true;
}
Hope someone can help with this seems it is harder than i thought
the indicator generates 3 variables in data window
bullentry
Value 2 - StopLoss value ie 0.9628
Value 3 - TakeProfit value ie 0.9698
bearentry
Value 5 - Stop Loss value ie 0.9698
Value 6 - TakeProfit value ie 0.9628
i am trying to test for Signal ie is current candle showing "bullentry" or "bearentry" and pass the variable value 2 and value 3 inthe case of "bull entry" to StopLossand take TakeProfit values or if "bearentry" values 5 and 6 respectivly
to use for trade entry
here is what i have written so far but does not work
//Long
string Signal=(iCustom(NULL,NULL,"ragstoriches",1,0));
double StopLoss=(iCustom(NULL,NULL,"ragstorichesf",2,0));
double TakeProfit=(iCustom(NULL,NULL,"ragstoriches",3,0));
if (Signal ="bullentry")
{
if (StopLoss > 0) stop = NormalizeDouble(Ask - (StopLoss * Point), Digits);
type = OP_BUY;
price = Ask;
SendTrade = true;
}
//Short
string Signal=(iCustom(NULL,NULL,"ragstoriches",4,0));
double StopLoss=(iCustom(NULL,NULL,"ragstorichesf",5,0));
double TakeProfit=(iCustom(NULL,NULL,"ragstoriches",6,0));
if (Signal ="bearentry")
{
if (TakeProfit > 0) take = NormalizeDouble(Bid - (TakeProfit * Point), Digits);
if (StopLoss > 0) stop = NormalizeDouble(Bid + (StopLoss * Point), Digits);
type = OP_SELL;
price = Bid;
SendTrade = true;
}
Hope someone can help with this seems it is harder than i thought