You need to get into the habit of reading the documentation when you don't know the correct syntax for a function . . . . OrderTakeProfit returns the take profit value for the currently selected order. Yoo probably want OrderClose instead.
Is there a way of setting extern double TakeProfit = as tenkan-sen<kijun-sen ? No.
Hi, I'm also trying to write an expert advisor based on the Ichimoku Indicator. But when it's compiled, there are 14 warnings. Can someone please help me compile it better?
extern double Lots = 0.1; // Amount of lots to trade with
extern double TakeProfit = 0; // The requested close price that determines the maximum profit for the given trade
extern double TrailingStop = 0; // Min number of pips in profit for the trailing stop to start
extern double StopLoss = 0; // The requested close price that determines the maximum loss allowed for the given trade
extern double TenkanSen = 9; // Tenkan-sen (highest high + lowest low)/2 for the last 9 periods
extern double KijunSen = 26; // Kijun-sen (highest high + lowest low)/2 for the past 26 periods
extern double SenkouSpan = 52; // Senkou span A (tenkan-sen + kijun-sen)/2 plotted 26 periods ahead. Senkou span B (highest high + lowest low)/2 calculated over the past 52 time periods and plotted 26 periods ahead
Hi, I'm also trying to write an expert advisor based on the Ichimoku Indicator. But when it's compiled, there are 14 warnings. Can someone please help me compile it better?
Please do not double post . . . you created a thread so use that thread and . . .
Is there a way of setting extern double TakeProfit = as tenkan-sen<kijun-sen
Setting it to 0 results in t/p with no price change.
Trying the code below gives me: ')' - wrong parameters count C:\Program Files (x86)\MetaTrader 4\experts\ICHIMOKU_F1.mq4 (26, 77) on the OrderTakeProfit line.
You need to get into the habit of reading the documentation when you don't know the correct syntax for a function . . . . OrderTakeProfit returns the take profit value for the currently selected order. Yoo probably want OrderClose instead.
Is there a way of setting extern double TakeProfit = as tenkan-sen<kijun-sen ? No.
Shouldn't OrderClose :
{
OrderClose(order_id,1,Ask,3,Red);
return(0);
}
say Bid instead of Ask
Shouldn't OrderClose :
{
OrderClose(order_id,1,Ask,3,Red);
return(0);
}
say Bid instead of Ask
Ok last thing - the buy order (OrderSend) does not work without Ask+"number"*Point
Of course it does . . . . you use 0 instead. So . . .
You need all the parameters, the ones that have = in them are optional.
Hi, I'm also trying to write an expert advisor based on the Ichimoku Indicator. But when it's compiled, there are 14 warnings. Can someone please help me compile it better?
//+------------------------------------------------------------------+Hi, I'm also trying to write an expert advisor based on the Ichimoku Indicator. But when it's compiled, there are 14 warnings. Can someone please help me compile it better?
Please do not double post . . . you created a thread so use that thread and . . .
Please read some other posts before posting . . .
Please edit your post . . . please use the SRC button to post code: How to use the SRC button.
I wish to include ICHIMOKU strategy in my trading. How or where do I download the strategy and how do I implement it on my trading platform ?
Appreciate your answers.
Thanks
Suresh