You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Your still trying to solve this? sorry (i don't know how i got so distracted). i've done a little bit of fiddling by adding variables "Occur" and "newtrenddistance".
i use a variable, usually called something "Occur", to check and make sure a process isn't done twice. the second one, newtrenddistance, is because i haven't taken the time to determine how much time your scalper has to make a desicsion if the trend has changed or not. i've assumed you've wanted to use closes to determine a new trend also.
basically, i added the few expressions,
Occur = True;
if((OrderType() == OP_SELL && iClose(NULL,0,1) > iClose(NULL,0,newtrenddistance)) || (OrderType() == OP_BUY && iClose(NULL,0,1) < iClose(NULL,0,newtrenddistance)))
{
Occur = False;
}
if(Occur == False)
{
OrderSend.....................;
}i'm not sure if this is going to execute perfectly what i had in mind, or live up to your complete desires from this addition, but it sparks an idea.
sorry, but i didn't have time to test it.