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
Oh and Alladir - you seem the obnoxious type.
Do yourself a favour and stop wasting your own time writing on this thread or any future ones I may write, if all your going to do is troll and not be helpful in anyway.
Oh and Alladir - you seem the obnoxious type.
Do yourself a favour and stop wasting your own time writing on this thread or any future ones I may write, if all your going to do is troll and not be helpful in anyway.
WHRoader (if you don't mind) could you tell me if I am right or wrong in this?
Are you saying that because iHighest simply states a bar number, me trying to put Buy_Price where OP_BUY used to be, doesn't make any sense because OrderSend takes a double? (when iHighest is an integer?)
How can I convert my iHighest logic into a price though so that my OrderSend function understands that I am wanting to buy the highest of the iHighest range?
If you can't be civil don't post.
Yea, you're right. Sorry.
WHRoader (if you don't mind) could you tell me if I am right or wrong in this?
"double buyPrice = iHighest(Symbol(), 0, MODE_HIGH, iBarShift(Symbol(), 0, triggerBarTime, true), 0);"
int Buy_Price = buyPrice;
"int buyticket = OrderSend(Symbol(),Buy_Price,LotSize,Ask,3,0,0,NULL,MagicNumber,0,Green);" Usually I'd put OP_BUY where Buy_Price is...
Play video
For large amounts of code, attach it.
"double buyPrice = iHighest...
"double price = int bar index," makes no sense. Break it down:Omg - Why is it so clear after you realise! I guess this is where practice makes perfect.
I honestly get it much better now. Put a :) on my face!
I'm going to try and get this done now and see what I can come out with!
Thank you!!
When I attempt to use this below, I am getting an error in the journal saying that OrderSend cmd function must be an integer?
I'm obviously not understanding because you've mentioned that "OrderSend only takes a price (a double) it makes no sense to open an order at 9"
Obviously if I change it to "int Buy_Price = buyPrice" this works to place the orders, but it isnt relevant to where the entry should be. (This is my last question - I don't want to take the mick of course!)
When I attempt to use this below, I am getting an error in the journal saying that OrderSend cmd function must be an integer?
I'm obviously not understanding because you've mentioned that "OrderSend only takes a price (a double) it makes no sense to open an order at 9"
Obviously if I change it to "int Buy_Price = buyPrice" this works to place the orders, but it isnt relevant to where the entry should be. (This is my last question - I don't want to take the mick of course!)
The error is the cmd in the OrderSend(), I know you don't want to hear it but if you want to learn you must also learn to check the documentation and learn how to read it . . . it is all part of the process . . . when I code an OrderSend() command I check it against the documentation every time to check I have remembered correctly.
What type of Order is this ? click --> OrderSend() says the 2nd parameter is cmd - Operation type. It can be any of the Trade operation enumeration.
Yea you're right RaptorUK - I do actually (pretty much on everything I do) is read the documentation (finger is practically sitting on F1 all the time.)
Jesus - With fresh eye's I've realised how stupid I've been!
I didn't mean to put buyPrice at the cmd - second parameter, I meant to place that at the 4th parameter (double Price)!
So that works (putting it in the right order) - I have changed it to a buy and sellstop orders. God i'm annoyed at how moronic I've been!
The "buyPrice" is simply slapping the Order above the high of the most recent closed bar that touched the 21 EMA (instead of the bar that was the highest of the MA cross and the bar that touched the 21 EMA...)
I'll have a play around and see where I am going wrong! (spent so much time staring at this its becoming painful now lol.)
Thank you!!!!
(p.s what does // Include tBT bar. Len = from - to + 1 note mean?)
(p.s what does // Include tBT bar. Len = from - to + 1 note mean?)
Highest bar index starting at zero for iTBT+1 bars includes the iTBT bar.
Your original post
did not include the triggerBarTime bar.