Extern bool

To add comments, please log in or register
viiozzo
295
viiozzo  

Dear All

when I change my variable (Money_management) to true or false, by launching my program, I do not get the desired result.
indeed if I leave by default in my program at FALSE, and I change my variable at launch, this is not taken into account.
I can't find my mistake.
can you please help me?
Thank you

Sergey Golubev
Moderator
114253
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button


viiozzo
295
viiozzo  
/
//+------------------------------------------------------------------+
//|                                                      EXTERNE.mq4 |
//|                        Copyright 2019, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
extern bool Money_management = false ;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---

   Print ("Money_management est   : " ,Money_management);

  }

viiozzo
295
viiozzo  
Sergey Golubev:

thk Sergey. i have do it
William Roeder
20210
William Roeder  
  1. You should have edited your original post, don't repost your code. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

Forex Limerence EA
1339
Forex Limerence EA  
viiozzo:

Dear All

when I change my variable (Money_management) to true or false, by launching my program, I do not get the desired result.
indeed if I leave by default in my program at FALSE, and I change my variable at launch, this is not taken into account.
I can't find my mistake.
can you please help me?
Thank you

I tested it and It is changing.

viiozzo
295
viiozzo  

Thk for your answer Mafuta Landou.

It's works in MT4 in real but not in strategy tester :-(

To add comments, please log in or register