NexusFi: Find Your Edge


Home Menu

 





Take profit and pip value


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two ABCTG with 1 posts (1 thanks)
    3. looks_3 sistemafuso with 1 posts (0 thanks)
    4. looks_4 Jura with 1 posts (0 thanks)
    1. trending_up 4,675 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
sistemafuso
verona veneto italy
 
Posts: 1 since May 2015
Thanks Given: 1
Thanks Received: 0

Hy guys!

I am new in this forum and I am basically new in easylanguage programming (trying to learn as a self-taught) so take patience if my questions are silly.
I am building a very easy TS which basically is recognising engulfing pattern and placing a sell limit oder on L[1].
I arbitrarily put 40 pips as TP but the Tradestation seams to forget to take the profit and is gonna close my open position just when another pattern is recognise or whe the SL is touched.
Everytime my condition is realize even though the price move way more than 40 pips the Tradestation doesn't close the position.
I've realized that if the TP is right after the candle with enter order the Tradestation is actually going to close the position correctly.

Here the code:


Quoting 
Variable: prezzo_stop(0),prezzo_take(0);
inputip_tp(40);

if close[1]> open[1] and close [0] < open [0] and C <l[1] and h>h[1] then begin

Sellshort next bar at l[1] limit;
prezzo_stop=h[0];
prezzo_take=(h[0]-l[1]);
SetProfitTarget (((bigpointvalue/1000)*10*pip_tp));

end;


Buytocover ("Loss")next bar at prezzo_stop stop ;


Thanks for your help.
Ah sorry for the really brutal english I have but I am from Italy where unfortunately there is no real possibility to learn this programming language.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What we know about Binances $6.3bn hack - BBC News
Cryptocurrency
Index roll effect in corn and wheat: gone, or moved into …
Commodities
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
Renko can be the way.
Commodities
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


sistemafuso,

don't place the Take Profit reserved word within your entry condition, this will likely lead to the situation that's only active during bars where the condition is fulfilled.
You should also read up about the SetStopPosition reserved word in the Tradestation help. To make sure that you correctly base the take profit on either the entire position or not.

Regards,
ABCTG


Follow me on X Reply With Quote
Thanked by:
  #4 (permalink)
 
dojirock's Avatar
 dojirock 
Saint Joseph, Michigan
 
Experience: Advanced
Platform: TradeStation
Trading: Indices, Futures, Forex
Posts: 13 since Jul 2014
Thanks Given: 3
Thanks Received: 4

Is this for advanced charts or timebased charting?

doji


Reply With Quote
  #5 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 691


dojirock View Post
Is this for advanced charts or timebased charting?

If "this" is the `SetProfitTarget` keyword mentioned in the first post, then yes, this works on any chart. If "this" is referring to ABCTG's post, then yes, this works on any chart irrespective of the time frame.


Reply With Quote




Last Updated on June 2, 2015


© 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