NexusFi: Find Your Edge


Home Menu

 





Place text at order entry/exit bar


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
ivanyu
Hong Kong
 
Posts: 15 since Jul 2013
Thanks Given: 0
Thanks Received: 1

Hi,

I am new to EasyLanguage, I have some logic that determines when to long (as below), and would like to also place the entry price at that bar (since order label cannot be dynamic).

However, the text is placed on every bar after the condition is true, which makes me really puzzled

Order is not entered multiple times though.

Is that because my max position is 1?

Or somehow because Text_New is a series function?

Sorry if this sounds very primitive.

Thanks!



if Close crosses over UpperBand then
Buy ( "SVE Vol LE" ) next bar market ;
Value2 = Text_New(Date, Time, Low, NumToStr(EntryPrice, 0));


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Expiration Day: Wall Street Rallies on Peace Hopes While …
Prediction Markets & Event Contracts
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
World Cup Opens: USA at 45.5% Tonight as Markets Push Ba …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
CFTC Rewrites the Rulebook -- Kalshi Cracks $1B Non-Spor …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
197 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642


Hi ivanyu,

this is because the way your code is currently you allow for text printing on every bar. The condition is only valid for the long entry.
You need to slightly modify your code to

 
Code
if Close crosses over UpperBand then begin
Buy ( "SVE Vol LE" ) next bar market ;
Value2 = Text_New(Date, Time, Low, NumToStr(EntryPrice, 0));
end;
You will probably notice two things now:
1. the text will be printed every time the Close crosses over the Upperband. Depending on how many entries you allow in the same position that could mean more text than entries.
2. The text might not reflect the correct entry price as it is drawn when the order is send (meaning at this moment there is no way to know the exact entry price already).

To overcome both issues you could simply move the text drawing to another condition, which could either be a change in the Marketposition or a change in the number of shares/contracts that are currently open.

Regards,
ABCTG


Follow me on X Reply With Quote




Last Updated on August 5, 2013


© 2026 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 - Downloads - Top
no new posts