molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Fri May 10, 2024 3:01 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: MQL+ code box SL Lowest Low code
PostPosted: Mon Feb 24, 2014 10:00 am 
Offline

Joined: Thu Aug 23, 2012 2:00 pm
Posts: 49
Hi Guys

I'm trying to add a simple piece of code to my EA using the new MQL+ code box but I'm just not getting it right...

Can someone point me in the right direction here:

int LookBack = 50;
{
double StopLoss = Low[iLowest(NULL, 0, MODE_LOW, LookBack, 1)];
}

It simply should put a SL 1 pip under the Lowest Low going back 50 candles...

The code is accepted in the SB diagram etc. etc

Thanx


Top
 Profile  
 
 Post subject: Re: MQL+ code box SL Lowest Low code
PostPosted: Mon Feb 24, 2014 5:42 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
To do that you need to change the code. First learn which variables have the stop loss - each buy / sell icon generate does variables automatically. Then you need to change those values on the fly. I would wait until we release dynamic stops


Top
 Profile  
 
 Post subject: Re: MQL+ code box SL Lowest Low code
PostPosted: Tue Feb 25, 2014 4:04 am 
Offline

Joined: Thu Aug 23, 2012 2:00 pm
Posts: 49
Thanx....

I tried to work it out..... I think SB set it to stoploss_s..... but I guess I should look into this further... can't wait for your new release....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009