How to find out the current market price?
Results 1 to 5 of 5

Thread: How to find out the current market price?

  1. #1
    Im attempting to shut an order by:

    if(OrdersTotal()==1)

    OrderClose(16384,1,Ask,3,Red);



    But what I want to mention is something like:
    if(the current price is greater then RectanglePriceMax OrdersTotal()==1)

    OrderClose(16384,1,Ask,3,Red);



    How do I mention that? The current price is greater lt;my variablegt; ?

  2. #2
    If(Bidgt;myprice OrdersTotal()==1) - Also close BUYS at the 'Ask' and SELLS with all the 'Bid' price.

  3. #3
    Thanks so much ... perhaps I can ask you a math question?

    I have two factors...

    RectanglePriceMax (1.42000)
    RextanglePriceMin (1.43000)

    These hold worth of currency's... examples are in (above)



    I need to find the difference of how many pips are in between them, and IF SMALLER then 50, to conduct the if statement...

    So I think its :

    int var3 = 0;
    var3 = RectanglePriceMax - RectanglePriceMin;

    if (var3 lt; 50)

    stuff



    but for some reason I do not get the expect consequences, is this right?

  4. #4
    Var3 = (RectanglePriceMax - RectanglePriceMin)/Stage;

    this will definitely get you the difference in pips. How you had it before the value could always be less than 50.

  5. #5
    Thanks , wicked, worked like a charm!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.