OrderSend Error 2400 - page 3

 
Tristen Shaw #: lol I take that to mean I was not getting warmer. Ok, I need some time to dissect and understand this.
Have a look at the updated code post too and reference the documentation as you go over it.
 
Fernando Carreiro #:

You are confusing the OP. The Spread returned by MarketInfo is in Points.

Also, don't use the "NormalizeDouble" but instead, use the "tick size" alignment.

I am not confusing him more then you actually.

He said he just started to learn and he is at the point where is trying to understand price, point, tick and how to use it, you are giving him this:

            dbDirection       = bBuy ? +1.0 : -1.0,
            dbPrice           = bBuy ? Ask : Bid,

and earlier you are directing him to read about Point() vs Tick_Size ( which a read also, learned something, thanks) but then you are using this:

dbStopLoss        = _Point * nStopLoss,

So what should we learned from that... Point() or Tick_Size ?!

 
Daniel Cioca #: So what should we learned from that... Point() or Tick_Size ?!

That is because he stated that the StopLoss variable was expressed in "points". So to convert it into a "price range", you have to scale it by the Point Size and not by the Tick Size.

If he had stated that StopLoss was in "ticks", then I would have used the Tick Size to convert it into a "price range".

The same logic applies to the Stops Level and Spread provided by the Symbol Information which is also expressed in "points".

 
Fernando Carreiro #:

That is because he stated that the StopLoss variable was expressed in "points". So to convert it into a "price range", you have to scale it by the Point Size and not by the Tick Size.

If he had stated that StopLoss was in "ticks", then I would have used the Tick Size to convert it into a "price range".

Alright, I think I'm starting to get my head around it. And I finally see how StopLevel fits into the calculation, which was puzzling me for a little bit. I kind of understood the concept, but couldn't quite figure out how to factor it in right.

I have plugged it all into my code and I have no errors showing, so I'm waiting to see what it does when it hits my trigger.

Again I thank both of you for being willing to take the time to help a newb. I have often found that coders can be very unfriendly to newbs who don't know what they don't know.

If anyone has an references for getting the last high and low from a zigzag indicator, I would be grateful. I have Googled the heck out of it and can't understand what any of them are talking about.