Download MetaTrader 5
To add comments, please log in or register
Learning MQL5? Start with documentation!
Jaret 2014.09.26 17:56 

Am I on the right track in understanding basics? Comments very welcome!

Jaret | 26 September, 2014

Simple code from <PRODUCT NAME REMOVED BY MODERATOR>. How to get so-called raw signal? Two questions still open for me: 1) 4 Inputs for main signal 2)Weight. Is it correct to assume, that when I put the weight in the tester valued: -1 ---it means, that I am using just the opposite signal compared to weight valued 1?


Suppose, I created the simplest Ea with <PRODUCT NAME REMOVED BY MODERATOR>, for example using signal Parabolic Sar.

Suppose, I want to use the signal as raw as possible, i.e. I dont want to get confused

by such four values, which are yet to be investigated deeper(for me, as a beginner). 

  1. Signal_ThresholdOpen --I understand basically %(0-100) for how strong signal the open action will trigger?
  2. Signal_ThresholdClose --I understand basically %(0-100) for how strong signal the close action will trigger?
  3. Signal_PriceLevel  --- what units(is it points, bars, pips or what?)
  4. Signal_Expiration -- this is clear(how many bars the pending order will exist
  5. Signal_SAR_Weight-- some kind of voting, the value is important, when I use multiple signals or Thresholds.

If I comment these lines out in  --- inputs for main signal 

//--- inputs for main signal
//input int                Signal_ThresholdOpen =10;                // Signal threshold value to open [0...100]
//input int                Signal_ThresholdClose=10;                // Signal threshold value to close [0...100]
//input double             Signal_PriceLevel    =0.0;               // Price level to execute a deal
input double             Signal_StopLevel     =50.0;              // Stop Loss level (in points)
input double             Signal_TakeLevel     =50.0;              // Take Profit level (in points)
//input int                Signal_Expiration    =4;                 // Expiration of pending orders (in bars)

 and do the same in ---Initialization function of the expert 

//| Initialization function of the expert                            |
int OnInit()
//--- Initializing expert
      //--- failed
      printf(__FUNCTION__+": error initializing expert");
//--- Creating signal
   CExpertSignal *signal=new CExpertSignal;
      //--- failed
      printf(__FUNCTION__+": error creating signal");
//   signal.ThresholdOpen(Signal_ThresholdOpen);
//   signal.ThresholdClose(Signal_ThresholdClose);
//   signal.PriceLevel(Signal_PriceLevel);
//   signal.Expiration(Signal_Expiration);
//--- Creating filter CSignalSAR
   CSignalSAR *filter0=new CSignalSAR;
      //--- failed
      printf(__FUNCTION__+": error creating filter0");
//--- Set filter parameters
//   filter0.Weight(Signal_SAR_Weight);

 I still can easily compile and test the expert.

 Why is weight as default in the <PRODUCT NAME REMOVED BY MODERATOR>- created as 1, then default step is 0.1 and up to 10 or is it important

that in the same expert weights of different signals are on the same scale(sure it is, I suppose)? 

To add comments, please log in or register