NexusFi: Find Your Edge


Home Menu

 





MultiCharts Easylanguage Price Decimal Points


Discussion in MultiCharts

Updated
    1. trending_up 3,233 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

MultiCharts Easylanguage Price Decimal Points

  #1 (permalink)
thephantom
London
 
Posts: 3 since Feb 2015
Thanks Given: 2
Thanks Received: 1

Hello
I am writing a Signal in Easylanguage for MultiCharts - to use on JPY and USD pairs. When referencing Open and Close in my easylanguage code, it is only returning prices to two decimal points. e.g. 1.54 for GBP/USD whereas the price is 1.53819. Or for EUR/JPY 135.71 when the price is 135.714.

I obviously want to use the Open and Close reserved words when placing orders - if this is only specified to two decimal points, it could be disastrous.

The code is very simple:

 
Code
Alert(Text("Price is ", Open));
Buy ("Buy") 1 Contracts Next Bar at Market;
Sell ("Buy - Hit Stop Loss") From Entry ("Buy") Next Bar at Open stop;
Please help?

Thanks.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

thephantom,

the signal will use whatever number of decimals are available. You only see two in the output because by default it's limited to two decimal. For the output you can easily add more decimal spaces. For your other computations this is not needed.

A numerical expression can be formatted to specify the minimum number of characters, including the decimal point, and the number of decimal places, to be used for the output:

Expression:C:E

Where: C - minimum number of characters
E - number of decimal places

This would display the text with three decimal places
 
Code
Alert(Text("Price is ", Open:0:3));
Regards,
ABCTG


thephantom View Post
Hello
I am writing a Signal in Easylanguage for MultiCharts - to use on JPY and USD pairs. When referencing Open and Close in my easylanguage code, it is only returning prices to two decimal points. e.g. 1.54 for GBP/USD whereas the price is 1.53819. Or for EUR/JPY 135.71 when the price is 135.714.

I obviously want to use the Open and Close reserved words when placing orders - if this is only specified to two decimal points, it could be disastrous.

The code is very simple:

 
Code
Alert(Text("Price is ", Open));
Buy ("Buy") 1 Contracts Next Bar at Market;
Sell ("Buy - Hit Stop Loss") From Entry ("Buy") Next Bar at Open stop;
Please help?

Thanks.


Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
thephantom
London
 
Posts: 3 since Feb 2015
Thanks Given: 2
Thanks Received: 1


ABCTG
Thanks for the reply - I was concerned the Open and Close prices displayed in the Alert would be what was sent to the broker when orders were submitted. As you've stated, this is not the case, and it's simply a matter of display/formatting for the Alert text.

Thanks for your help and confirmation on how to get the decimal places displayed in the Alert.

Reply With Quote
Thanked by:
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

thephantom,

you are welcome.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on February 16, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts