NexusFi: Find Your Edge


Home Menu

 





Place text at order entry/exit bar


Discussion in EasyLanguage Programming

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




 
Search this Thread

Place text at order entry/exit bar

  #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?
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
18 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


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 Twitter Reply With Quote




Last Updated on August 5, 2013


© 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