Forum

How to save order open course not as a bid or ask but current value that is expressed in points. [SOLVED]

Hi, i want save course as a value in global variable . It need to be save as a current value, written in points . Not the Ask or Bid. I want to use it to compare distance between orders. If i use GlobalVariableSet GLV == OrderOpenPrice than it will be ask or bid price and it will be always current

A variable that have the same value even when course is changing. Saving value to next counting.

I want save results of counting to use them when next tick induce reaction in EA and there will be next counting. A Variable that will still have a value from last counting to the next counting even when meantime course will change. Even better if it will still have this value when i shut down

I need to select historical order 1 before the youngest. First order before last one.

I need to know if the order before lest one was sell or buy and what was the open price and if there had been a take profit or stop loss used at the end. can you help me

How to select the order that have profit?

I' ve try this method but without effects: for (i = OrdersTotal () - 1 ; i >= 0 ; i -- ) { //for2 if ( OrderSelect (i, SELECT_BY_POS) && OrderSymbol () == Symbol () && diference <= OrderProfit () ) Also I can use OrderOpenPrice like that: int course = Bid ;

Logic problem I think.... looking for help:)

int start() { //---- int action = 0 ; double loty = 1 / 100 ; int course = Bid ; int lastOpenTime = 0 , Ticket = 0 ; double point = MarketInfo ( Symbol (),MODE_POINT); double diference = 50 *point; bool result; double price, Oprice; int cmd, error;lem

Why this code is always closing orders? looking for a prompt:)

int start() { //---- int action = 0 ; double loty = 1 / 100 ; int course = Bid; int lastOpenTime = 0 , needleTicket = 0 ; double point = Point ; double diference = 50 *point; bool result; double price, Oprice; int cmd, error; for ( int i = OrdersTotal () - 1 ; i >= 0 ; i -- ) { if ( OrderSelect (

Looking for the last order open price. Without MagicNumber A theme is closed. thanks:)

The problem for me is that i don't know what was last order MagicNumber. - I need to check open price of the last order even when I close and start again computer. If I know what was the magic number, than I could use this code... int OPrice; for(int pos=OrdersTotal()-1; pos >= 0; pos--) if (

Alert! Order Cancel Failed: 129 ??

Hi, I don't know what is wrong. I can't close the order. There is last ERROR nr 129. Can you help me? for (pos = OrdersTotal ()- 1 ; pos >= 0 ; pos--) if ( OrderSelect (pos, SELECT_BY_POS) && OrderMagicNumber() == 4

EA works but can't send one of the orders. Looking for help.

int start() { //---- double ABUY= 0 ; double ASELL= 0 ; double BBUY= 0 ; double BSELL= 0 ; double HABUY= 0 ; double HASELL= 0 ; double HBBUY= 0 ; double HBSELL= 0 ; double point = MarketInfo( Symbol (),MODE_POINT); double expiration=CurTime()+ PERIOD_D1 * 60 ; int n; int