Forum

Take a break when I lose my deal.

I'd like to take a break when I lose my deal. I've made a code, but it doesn't work properly. I'd like to put it in terms of purchase. Can you explain the above code? extern double initial_Lots = 0.1 ; //+------------------------------------------------------------------+ //| exter Var

Confirm latest transaction profit

I'm going to choose the last deal. As shown below, the profit and loss of all transactions will be shown. I choose the last transaction, and I want to see the gain of the transaction, but where should I fix it? for ( int i = HistoryTotal ()- 1 ; i>= 0 ; i--) { if ( OrderSelect (i, SELECT_BY_POS

Order after a certain amount of time

Soon after the loss occurs, the order will go further and further losses will occur. After the loss, I want to place an interval between the following order Can you tell me where the problem is? Even if I use it, it does not make any difference when I are not using it

Lots auto calculation based on account and Martingale Transactions

Lots will increase automatically according to the balance of account balances, and if the transaction is lost, the next transaction launcher increase by multiplying by the external input variables multiplied by the external input variable. If I follow the coding below, it is printed " "invalid lots

OrderModify error 130 on this code.

hi guys. I'm trying to modify an Order, but I always get Error #130 . I looked for other texts, but ... Different from this code, it is difficult to understand and apply. So I raise my code. Please let me know based on this code. extern double initial_Lots = 1.0; extern int MagicNo = 1234; extern

Lot calculation

It's a pleasant weekend. I'm trying to make the Martin Gail lot calculation. If I lose, I'll double up in the front door twice and return to the initial value if I get profits. However, this will result in error 4051. And I don't know if it's okay to solve 4051 or something else. Wait for your help

MartenGale Format

I'm trying to build a Martin Gail based on these codes. Do you know the location of the writing on the style of writing this type of Martin Gail code? Let me have your answer. if (NewBar() ) { //if(total<1) { //BUY if ( //conditional expression ) {

Condition of liquidation

If I put it in this way, Is there any error? int CurrentTime; int Past = 2; int BarsCount = 0; int i; datetime PreviousBar; int start() { if((NewBar()) ){ for (cnt= 0 ;cnt< OrdersTotal ();cnt++) { OrderSelect (cnt, SELECT_BY_POS , MODE_TRADES ); if ( OrderMagicNumber ()==MagicNo

If I use return() -> error5004

I try to use the value outside of the "for". but when I use "return(Max_Value);" , error 5004 appear or print nothing What should I do? File "Max" ex) 2000-00-00 0:00,00 2000-00-00 0:00,00 2000-00-00 0:00,00 00 => Value between 1 and 100 int Past = 2 ; int BarsCount = 0 ; int i; bool Max_Average=

Outside "for" ???

How do I use the Max Value value outside of function "for"? int BarsCount = 0 ; int i; bool Max_Average= False ; bool NewBar= false ; double Max_Value; int data_size = 8650 ; int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { } int start() { for (i = 0 ; i<