NexusFi: Find Your Edge


Home Menu

 





Take profit and pip value


Discussion in EasyLanguage Programming

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




 
Search this Thread

Take profit and pip value

  #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?
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
30 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,435 since Apr 2013
Thanks Given: 482
Thanks Received: 1,627


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 Twitter 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: 690


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


© 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