V1N1 LONY Breakout 5.10 - page 2

To add comments, please log in or register
twiggers
7
twiggers  

Hi Vinicius 

thanks for the above reply is there a way to set the target for a set amount of pips above the breakout?

Thanks in advance

Vinicius de Oliveira
3914
Vinicius de Oliveira  
twiggers:

Hi, one way would be to make the following code changes:


// From
input double    iTPfactor    = 1.5;        // Take Profit Factor - Stop Loss

// To
input int       iTakeProfit  = 500;        // Take Profit From Range - Points

//===========

// From
if(iTPfactor <= 0.0)
  {
   Alert(Symbol(), Period(), " - Take Profit Factor is required.");
   Print(Symbol(), Period(), " - Take Profit Factor is required.");
   return(INIT_PARAMETERS_INCORRECT);
  }

// To
if(iTakeProfit <= 0)
  {
   Alert(Symbol(), Period(), " - Take Profit From Range is required.");
   Print(Symbol(), Period(), " - Take Profit From Range is required.");
   return(INIT_PARAMETERS_INCORRECT);
  }

//===========

// From
TP  = NormalizeDouble(Ask + (Ask - SL) * iTPfactor, Digits);

// To
TP  = NormalizeDouble(RangeHigh + iTakeProfit * Point, Digits);

//===========

// From
TP  = NormalizeDouble(Bid - (SL - Bid) * iTPfactor, Digits);

// To
TP  = NormalizeDouble(RangeLow - iTakeProfit * Point, Digits);


- Compile the file;


- In the input parameter Take Profit From Range - Points, enter the value you want to test.

twiggers
7
twiggers  

Hi Vinicius

thank you for all your help, I modified the file as above and it loads fine and the ea shows the smiley face however I set it to take the break of the range  of the 7am UK time candle but I cant get it to take a trade. Any help would be greatly appreciated.

See attached amended ea

Files:
EOB_1.1.mq4 81 kb
Vinicius de Oliveira
3914
Vinicius de Oliveira  

Hi, you can use, for example, the attached setting file to try to optimize considering only one range bar.


I hope it helps you.

pizid
9
pizid  
Hello Vinicius de Oliveira, Thanks to Vinicius de Oliveira for announcing EA. - I would like you to help me further consider price conditions that surpass the Asian time frame. - I see you have provided the V1N1 Prime signal, which is an upgrade of V1N1 LONY Breakout 5.10 is not?
12
To add comments, please log in or register