andre.costa101:
Hello guys...
I'm a newbie on this, so I guess my error could be fairly simple:
I want to put a pending order at a certain distance from a point I will call "Anchor".
So:
Where is the error?
Try doing like this:
extern double Anchor = 1.0; // Initial point where I will manually enter a price like: 1.17293 extern double Distance = 5; // the distance which I will indicate int OnInit() { if(Digits == 5 || Digits == 3 || Digits == 1)P = 10;else P = 1; // To account for 5 digit brokers double Entry = Anchor - (Distance*Point); // just to simplify the price in the order; ticket = OrderSend(NULL,OP_SELLSTOP,Lots,NormalizeDouble(Entry,Digits),Sllpg,StopL,TakeP,NULL,MagicNumber,0,clrBlue); }
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
Hello guys...
I'm a newbie on this, so I guess my error could be fairly simple:
I want to put a pending order at a certain distance from a point I will call "Anchor".
So:
Where is the error?