Alberto Tortella
Added topic Gain Indicator
Hi, I wrote the attached indicator but it doesn't work. The indicator would work as a cumulate sum: if( Close[0]>High[1] ) { Gain[i]= "Previous Gain" + (Close[0]-High[1]) ; } if( Close[0]<High[1] && High[0]>High[1] ) {
Alberto Tortella
Added topic Lowest low after 8.00
Hi all, I have an expert that runs on a daily graph. The expert contains this condition: Hour()>= 8 && Hour()<=20. I need to write the following condition. The Low after 8.00 is < High[1], where High[1] is the previous day highest
Alberto Tortella
Added topic bool variable to check opened orders
I’m trying to write a boolean variable that is true when no orders are opened on the current Symbol(). I receive the error “too complex expression”. Bool Opened = for(cnt=0;cnt<=total;cnt++) { OrderSelect (cnt, SELECT_BY_POS, MODE_TRADES);
Alberto Tortella
Added topic #include function
Hi, I wrote the attached file to calculate the number of lots. I save the file in "Include" folder, with .mq4 extension. Then I wrote #include <Lot Size.mq4> in the destination file. If i Write int start() { LotSize_Long();
Alberto Tortella
Added topic Bid Cross...
Hi, is there the possibility to write a condition like this? If (Bid > High[1] && prevoious Bid < High[1]) { .... } instead of an indicator that check the opened positions? Thank you! Alberto
Alberto Tortella
Added topic How to check for opened positions?
Hi everybody, is there a predefined way to check if an expert is trading on a Symbol(), or if a position is actually open on a Symbol(). Actually I’m using an int variable to check this, but I’d like to know if there is a specific function such as
Alberto Tortella
Added topic New rows on Expert Advisors page
I have noted that when I apply an indicator to a graph, then I see new rows on the Expert Advisor page (in terminal). Is there the possibility to avoid the creation of these new rows that are not so important ? I prefer to see only the rows produced
Alberto Tortella
Added topic Metatrader and Excel
Hi, I’m searching for a manual or a guide to understan how to link the MetaTrader platform whit Microsoft Excel, through DDE server. Could you help me? Thank you
Alberto Tortella
Added topic How to avoid entry gaps?
Hi all, I have this entry condition: Bid > High[1], were High[1] is the highest bid of the previous daily bar. I need a condition to avoid the trade if the Bid price forms an up gap with High[1]. How can I proceed? Thank you
Alberto Tortella
Added topic Order Modify Error 1
Hi, I’m writing this code, but I obtain the message “OrderModify Error 1” because the system continue to see as valid the condition “Bid > TakeProfit_Long_1”. I need to modify the orders only one time, when Bid price cross TakeProfit_Long_1. How
Alberto Tortella
Added topic Orderprofit() function
Hi, I need an explanation about the output of the Orderprofit() function. Is the output expressed in pips, account currency or in current currency? Thank you
Alberto Tortella
Added topic bool variable for new bar
Hi, I need to set up a bool variable that is true when a new bar is started, for instance when the 10.00 AM bar is closed and the 11.00 AM is started. What do you think about this code? bool isNewBar() { static datetime lastbar=0; datetime curbar =
Alberto Tortella
Added topic bool variable
Hi, I need to create a bool variable that is true if an order that was previously opened now is closed. How can I proceed? Thank you
Alberto Tortella
Added topic Trailing Stop on 2nd order
Hi, I have this statement to place 2 orders if(Long) { ticket_1=OrderSend(Symbol(),OP_BUY,Lots,Ask,NULL,15,15,"UP",0,0,Green); ticket_2=OrderSend(Symbol(),OP_BUY,Lots,Ask,NULL,15,30,"UP",0,0,Green); } I need to move my trailing
Alberto Tortella
Added topic Invalid Lots Amount ?
Hi everybody, from the attached EA I obtain the following message error: 2008.07.04 11:54:41 Inside Bar Lots EURJPY,H1: invalid lots amount for OrderSend function 2008.07.04 11:54:41 Inside Bar Lots EURJPY,H1: Error opening SELL order : 4051 Could
Alberto Tortella
Added topic Today bar on 1H graphs
Hi, I have for instance this entry condition for 1H graphs. Bid > High[5] I need to check if High[5] is formed on a today hourly bar. I don’t want to consider High[5] if it is a yesterday bar. How can I check this? Thank you
Alberto Tortella
Added topic Highest / Lowest
Hi, I need to calculate the Highest Value of a Moving Average in the most recent 20 bars. I think I can’t use the iHighest function... Anyone can halp me? Thank you
Alberto Tortella
Added topic Error with Tester
Hi, I have the following error using the Strategy Tester . TestGenerator: unmatched data error (volume limit 285 at 2008:04:15 15:23 exceeded). Where is the problem? I'm working on the following EA. Thank you. extern double TakeProfit = 30; extern
Alberto Tortella
Added topic Total trades for an expert advisor
Hi, is there an indicator the returns the number of trades opened from a single expert advisor? I don't refer to OrdersTotal () function: it returns the number of trades opened on the entire account. Thank you
Alberto Tortella
Added topic Array for Ask and Bid prices
Hi, I wrote the followng double. ask_price = MarketInfo ("EURUSD",MODE_ASK); Is there the possibility to use this double to call the previous value of ask prices? Something as price(-1)? Thank you