Forum

OrderClose problem

Hi there where is the mistake ? doesn't want to close the order :( Thank you :) if (h4== 1 && h1== 1 && m30== 1 && m15== 1 ){ if (ticket<= 0 ){ ticket= OrderSend ( Symbol (), OP_BUY, 0.01 , Ask, 1 , 0 , 0 , "Buy" , 1

Close the position???

Why doesn't works? I need to close the position BUY when new bar is close below close earlier bar the same on SELL close then BAR close under the earlier close bar: if ( OrdersTotal ()> 0 ){ for (i= 1 ; i<= OrdersTotal (); i++){ // Cycle searching in orders if ( OrderSelect (i- 1

Closing only selected positions

total = OrdersTotal ( ) ; if ( total < 1 ) { if ( isCrossed = = 1 ) //jezeli jeden to daje sygnal buy i zajmuje dluga pozycje { //1 //preferowana cena zamkniecia,roznica,stop loss,take profit

problem with clossing the positions

hey!!!i'm new at this forum and I have the problem: int Crossed (double line1, double line2) { static int last_direction = 0; static int current_direction = 0; //Don't work in the first load, wait for the first cross! static bool first_time = true; if(first_time == true) { first_time = false; return