Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Is possible to trade trendline breakout?
 Post subject: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Thu 14 Jul, 2011, 16:55 

User rating: 0
Joined: Thu 14 Jul, 2011, 16:46
Posts: 8
Location: Canada,
My question is: Is possible to trade trendline breakout with a Strategy?

For example in mt4 we have this following EA, how to trade with jforex strategy? I noticed that in jforex there is no such property as trendline name, how to distinguish two lines or others objects? How to program similar strategy as this EA? Thanks.

//+------------------------------------------------------------------+
//|                                               TrendMeLeaveMe.mq4 |
//|                              Copyright © 2006, Eng. Waddah Attar |
//|                                          [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007,Eng Waddah Attar"
#property link      "[email protected]"
//----
extern string BuyStop_Trend_Info = "_______________________";
extern string BuyStop_TrendName = "HL_1";//"buystop";
extern int    BuyStop_TakeProfit = 50;
extern int    BuyStop_StopLoss = 30;
extern double BuyStop_Lot = 0.1;
extern int    BuyStop_StepUpper = 10;
extern int    BuyStop_StepLower = 50;
extern string SellStop_Trend_Info = "_______________________";
extern string SellStop_TrendName = "LL_1";//"sellstop";
extern int    SellStop_TakeProfit = 50;
extern int    SellStop_StopLoss = 30;
extern double SellStop_Lot = 0.1;
extern int    SellStop_StepUpper = 50;
extern int    SellStop_StepLower = 10;
//------
int MagicBuyStop = 2101;
int MagicSellStop = 2102;
int glbOrderType;
int glbOrderTicket;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
   //Comment("TrendMeLeaveMe by Waddah Attar");
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int deinit()
  {
   //Comment("");
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   double vH, vL, vM, sl, tp;
   if(ObjectFind(BuyStop_TrendName) == 0)
     {
       SetObject("High" + BuyStop_TrendName,
                 ObjectGet(BuyStop_TrendName, OBJPROP_TIME1),
                 ObjectGet(BuyStop_TrendName, OBJPROP_PRICE1) + BuyStop_StepUpper*Point,
                 ObjectGet(BuyStop_TrendName, OBJPROP_TIME2),
                 ObjectGet(BuyStop_TrendName, OBJPROP_PRICE2) + BuyStop_StepUpper*Point,
                 ObjectGet(BuyStop_TrendName, OBJPROP_COLOR));
       SetObject("Low" + BuyStop_TrendName,
                 ObjectGet(BuyStop_TrendName, OBJPROP_TIME1),
                 ObjectGet(BuyStop_TrendName, OBJPROP_PRICE1) - BuyStop_StepLower*Point,
                 ObjectGet(BuyStop_TrendName, OBJPROP_TIME2),
                 ObjectGet(BuyStop_TrendName, OBJPROP_PRICE2) - BuyStop_StepLower*Point,
                 ObjectGet(BuyStop_TrendName, OBJPROP_COLOR));
       vH = NormalizeDouble(ObjectGetValueByShift("High"+BuyStop_TrendName,0),Digits);
       vM = NormalizeDouble(ObjectGetValueByShift(BuyStop_TrendName,0),Digits);
       vL = NormalizeDouble(ObjectGetValueByShift("Low"+BuyStop_TrendName,0),Digits);
       sl = vH - BuyStop_StopLoss*Point;
       tp = vH + BuyStop_TakeProfit*Point;
       if(Ask <= vM && Ask >= vL && OrderFind(MagicBuyStop) == false)
           if(OrderSend(Symbol(), OP_BUYSTOP, BuyStop_Lot, vH, 3, sl, tp,
              "", MagicBuyStop, 0, Green) < 0)
               Print("Err (", GetLastError(), ") Open BuyStop Price= ", vH, " SL= ",
                     sl," TP= ", tp);
       if(Ask <= vM && Ask >= vL && OrderFind(MagicBuyStop) == true &&
          glbOrderType == OP_BUYSTOP)
         {
           OrderSelect(glbOrderTicket, SELECT_BY_TICKET, MODE_TRADES);
           if(vH != OrderOpenPrice())
               if(OrderModify(glbOrderTicket, vH, sl, tp, 0, Green) == false)
                   Print("Err (", GetLastError(), ") Modify BuyStop Price= ", vH,
                         " SL= ", sl, " TP= ", tp);
         }
     }
   if(ObjectFind(SellStop_TrendName) == 0)
     {
       SetObject("High" + SellStop_TrendName,
                 ObjectGet(SellStop_TrendName, OBJPROP_TIME1),
                 ObjectGet(SellStop_TrendName, OBJPROP_PRICE1) + SellStop_StepUpper*Point,
                 ObjectGet(SellStop_TrendName, OBJPROP_TIME2),
                 ObjectGet(SellStop_TrendName, OBJPROP_PRICE2) + SellStop_StepUpper*Point,
                 ObjectGet(SellStop_TrendName, OBJPROP_COLOR));
       SetObject("Low" + SellStop_TrendName, ObjectGet(SellStop_TrendName, OBJPROP_TIME1),
                 ObjectGet(SellStop_TrendName, OBJPROP_PRICE1) - SellStop_StepLower*Point,
                 ObjectGet(SellStop_TrendName, OBJPROP_TIME2),
                 ObjectGet(SellStop_TrendName, OBJPROP_PRICE2) - SellStop_StepLower*Point,
                 ObjectGet(SellStop_TrendName, OBJPROP_COLOR));
       vH = NormalizeDouble(ObjectGetValueByShift("High" + SellStop_TrendName, 0), Digits);
       vM = NormalizeDouble(ObjectGetValueByShift(SellStop_TrendName, 0), Digits);
       vL = NormalizeDouble(ObjectGetValueByShift("Low" +SellStop_TrendName, 0), Digits);
       sl = vL + SellStop_StopLoss*Point;
       tp = vL - SellStop_TakeProfit*Point;
       if(Bid >= vM && Bid <= vH && OrderFind(MagicSellStop) == false)
           if(OrderSend(Symbol(), OP_SELLSTOP, SellStop_Lot, vL, 3, sl, tp, "",
              MagicSellStop, 0, Red) < 0)
               Print("Err (", GetLastError(), ") Open SellStop Price= ", vL, " SL= ", sl,
                     " TP= ", tp);
       if(Bid >= vM && Bid <= vH && OrderFind(MagicSellStop) == true &&
          glbOrderType == OP_SELLSTOP)
         {
           OrderSelect(glbOrderTicket, SELECT_BY_TICKET, MODE_TRADES);
           if(vL != OrderOpenPrice())
               if(OrderModify(glbOrderTicket, vL, sl, tp, 0, Red) == false)
                   Print("Err (", GetLastError(), ") Modify Sell Price= ", vL, " SL= ", sl,
                         " TP= ", tp);
         }
     }
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool OrderFind(int Magic)
  {
   glbOrderType = -1;
   glbOrderTicket = -1;
   int total = OrdersTotal();
   bool res = false;
   for(int cnt = 0 ; cnt < total ; cnt++)
     {
       OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
       if(OrderMagicNumber() == Magic && OrderSymbol() == Symbol())
         {
           glbOrderType = OrderType();
           glbOrderTicket = OrderTicket();
           res = true;
         }
     }
   return(res);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void SetObject(string name,datetime T1,double P1,datetime T2,double P2,color clr)
  {
   if(ObjectFind(name) == -1)
     {
       ObjectCreate(name, OBJ_TREND, 0, T1, P1, T2, P2);
       ObjectSet(name, OBJPROP_COLOR, clr);
       ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
     }
   else
     {
       ObjectSet(name, OBJPROP_TIME1, T1);
       ObjectSet(name, OBJPROP_PRICE1, P1);
       ObjectSet(name, OBJPROP_TIME2, T2);
       ObjectSet(name, OBJPROP_PRICE2, P2);
       ObjectSet(name, OBJPROP_COLOR, clr);
       ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
     }
  }
//+------------------------------------------------------------------+


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Fri 15 Jul, 2011, 12:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
jeandl wrote:
My question is: Is possible to trade trendline breakout with a Strategy?
Yes it is, you can programmatically plot and access from your strategy all necessary chart objects - both the standard ones and your own customized ones. See:
https://www.dukascopy.com/wiki/index.php?title=IChart
If it is your very first strategy, see:
https://www.dukascopy.com/wiki/index.php ... _in_JForex
jeandl wrote:
I noticed that in jforex there is no such property as trendline name, how to distinguish two lines or others objects?
Once you plot an object on the chart you can access it by its key parameter by using IChart.get(String key) or you can access all of your objects by IChart.getAll(). Similarly you can move, remove and modify your chart objects, see:
https://www.dukascopy.com/client/javadoc ... Chart.html
jeandl wrote:
How to program similar strategy as this EA?
To provide you some idea how JForex startegy works with chart objects (for simplicity it assumes trendlines having constant prices) consider the example strategy which draws two lines on the chart - one below the current tick price on strategy start and one above it. On every tick the strategy checks if any of the lines have been crossed. On every such cross an order gets created. Lines are added to the chart in an unlocked mode which mens that they can be selected by the user, moved around or even deleted(note that the strategy will react to these changes correspondingly).
package charts.test;

import java.awt.Color;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
import java.util.UUID;

import javax.swing.SwingConstants;

import com.dukascopy.api.*;
import com.dukascopy.api.IChartObject.ATTR_INT;
import com.dukascopy.api.IEngine.OrderCommand;
import com.dukascopy.api.IIndicators.AppliedPrice;
import com.dukascopy.api.IIndicators.MaType;
import com.dukascopy.api.drawings.IChartObjectFactory;
import com.dukascopy.api.drawings.IHorizontalLineChartObject;
import com.dukascopy.api.drawings.ILongLineChartObject;
import com.dukascopy.api.drawings.IShortLineChartObject;

/**
 * The strategy draws two lines on the chart - one below the current tick price on strategy start and one above it.
 * On every tick the strategy checks if any of the lines have been crossed. On every such cross an order gets created.
 * Lines are added to the chart in an unlocked mode which mens that they can be selected by the user and moved around.
 *
 */
public class TrendLineCross implements IStrategy {
   private IEngine engine;
   private IConsole console;
   private IHistory history;
   private IChart chart;
   

   @Configurable("Instrument")
   public Instrument instrument = Instrument.EURUSD;
   @Configurable("Amount")
   public double amount = 0.02;
   
   private int orderCount;
   private SimpleDateFormat sdf;
   private ITick lastTick;

   public void onStart(IContext context) throws JFException {
      this.engine = context.getEngine();
      this.console = context.getConsole();
      this.history = context.getHistory();
      this.chart = context.getChart(instrument);

      sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
      
      print("start");
      
      lastTick = history.getLastTick(instrument);
      drawLines(lastTick.getAsk());
   }

   public void onTick(Instrument instrument, ITick tick) throws JFException {
      if (instrument != this.instrument)
         return;
      
      //bid price crosses the above line - make BUY order
      if ( chart.get("lineAbove") != null
            && tick.getAsk() > chart.get("lineAbove").getPrice(0)
            && lastTick.getAsk() < chart.get("lineAbove").getPrice(0)){
         print(sdf.format(tick.getTime()) + " Above line crossed, make BUY");
         engine.submitOrder("buyOrder" + (++orderCount), instrument, OrderCommand.BUY, amount);
      }
      
      //bid price crosses the below line - make SELL order
      if (chart.get("lineBelow") != null
            && tick.getBid() < chart.get("lineBelow").getPrice(0)
            && lastTick.getBid() > chart.get("lineBelow").getPrice(0)){
         print(sdf.format(tick.getTime()) + " Below line crossed, make SELL");
         engine.submitOrder("buyOrder" + (++orderCount), instrument, OrderCommand.SELL, amount);
      }
      
      lastTick = tick;
   }

   
   //draws two horizontal lines - one 5 pips above the price, the other - 5 pips below the price
   private void drawLines(double price){
      
      IChartObjectFactory factory = chart.getChartObjectFactory();
      
        IHorizontalLineChartObject lineAbove = factory.createHorizontalLine("lineAbove", price + 0.0005);
        lineAbove.setColor(Color.GREEN);
        lineAbove.setAttrInt(ATTR_INT.WIDTH, 2);
        lineAbove.setText(" Above line ", SwingConstants.CENTER);
        //unlocked means that you can select the line and move it while strategy is running
        chart.addToMainChartUnlocked(lineAbove);
       
        IHorizontalLineChartObject lineBelow = factory.createHorizontalLine("lineBelow", price - 0.0005);
        lineBelow.setColor(Color.RED);
        lineBelow.setAttrInt(ATTR_INT.WIDTH, 2);
        lineBelow.setText(" Below line ", SwingConstants.CENTER);
        chart.addToMainChartUnlocked(lineBelow);
       
   }

   private void print(Object message) {
      console.getOut().println(message);
   }
   
   //close all orders on strategy stop and remove both lines if they have not been removed already
   public void onStop() throws JFException {
      for (IOrder order : engine.getOrders()) {
         engine.getOrder(order.getLabel()).close();
      }
      chart.remove("lineAbove");
      chart.remove("lineBelow");
   }
   

   public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {   }


   public void onAccount(IAccount account) throws JFException {   }

   public void onMessage(IMessage message) throws JFException {   }

}


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Fri 15 Jul, 2011, 17:49 

User rating: 0
Joined: Thu 14 Jul, 2011, 16:46
Posts: 8
Location: Canada,
Thanks a lot for your explanation and examples, I'm totally new to Jforex, and will look into the coding.


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Thu 21 Jul, 2011, 16:04 

User rating: 0
Joined: Thu 14 Jul, 2011, 16:46
Posts: 8
Location: Canada,
Now, I want to know How:

Manually draw two trendlines: one is for Sellstop order, another line for Buystop order;

After drawing these two lines, how to give each line an ID? so that inside the Strategy you can get the price value for a given time (bar)?

I could not find how, could you please help?


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Fri 22 Jul, 2011, 07:50 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
jeandl wrote:
Manually draw two trendlines: one is for Sellstop order, another line for Buystop order;

After drawing these two lines, how to give each line an ID? so that inside the Strategy you can get the price value for a given time (bar)?
The chart objects plotted from JForex client are not accessible from the strategy, since the strategy only handles its own objects (access to all user created chart objects from startegy will be available from the next platform version).

However, once you create a BUYSTOP order, the platform already plots the price line, which when double-clicked is movable and according to the user-made adjustments to the line's price, the price of the order is automatically adjusted. The same is true with other type of conditional orders (e.g. other stop and limit orders, OCO orders, take profit, stop loss).

See the following example strategy. Try it with live data and double click on its BUYSTOP, STOP LOSS or TAKE PROFIT lines, move them and see how the order is being adjusted. Note that if you cancel the order, then on next 10 second bar a new order will get created:

package jforex.strategies.oneorder;

import com.dukascopy.api.*;

/**
 * The strategy tries to make a BUYSTOP order in every 10 seconds - it does so
 * if all previous orders have been closed or canceled
 *
 */
public class OneOrderStopOrder implements IStrategy {

   private IConsole console;
   private IEngine engine;
   
   private Instrument instrument = Instrument.EURUSD;
   private Period period = Period.TEN_SECS;
   
   private int counter;
   
   //user defined
   private final double buyStopPriceStep = 0.0002;
   private double slippage = 1;
   
   @Override
   public void onStart(IContext context) throws JFException {
      engine = context.getEngine();
      console = context.getConsole();
      print("Start");
   }

   @Override
   public void onTick(Instrument instrument, ITick tick) throws JFException {}

   @Override
   public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
      if(!instrument.equals(this.instrument) || ! period.equals(this.period))
         return;
      double stopLossPrice = askBar.getClose() - 0.0005;
      double takeProfitPrice = askBar.getClose()  + 0.0005;
      //make a new order if there are no orders or the previous orders have been either closed or cancelled
      if(engine.getOrders().size() == 0){
         engine.submitOrder("order" + counter++, this.instrument, IEngine.OrderCommand.BUYSTOP, 0.01,
            askBar.getClose() + buyStopPriceStep, slippage, stopLossPrice, takeProfitPrice);
      }

   }

   @Override
   public void onMessage(IMessage message) throws JFException {}

   @Override
   public void onAccount(IAccount account) throws JFException {}

   @Override
   public void onStop() throws JFException {
      for(IOrder o : engine.getOrders())
         o.close();
   }
   
   private void print(Object o){
      console.getOut().println(o);
   }

}


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Thu 28 Jul, 2011, 18:38 

User rating: 0
Joined: Thu 14 Jul, 2011, 16:46
Posts: 8
Location: Canada,
Great , thanks. Looking forward to your next version of Jforex.


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Wed 15 May, 2013, 00:05 

User rating: 0
Joined: Tue 05 Mar, 2013, 22:08
Posts: 4
API Support wrote:
To provide you some idea how JForex startegy works with chart objects (for simplicity it assumes trendlines having constant prices) consider the example strategy which draws two lines on the chart - one below the current tick price on strategy start and one above it. On every tick the strategy checks if any of the lines have been crossed. On every such cross an order gets created. Lines are added to the chart in an unlocked mode which mens that they can be selected by the user, moved around or even deleted(note that the strategy will react to these changes correspondingly).
package charts.test;

import java.awt.Color;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
import java.util.UUID;

import javax.swing.SwingConstants;

import com.dukascopy.api.*;
import com.dukascopy.api.IChartObject.ATTR_INT;
import com.dukascopy.api.IEngine.OrderCommand;
import com.dukascopy.api.IIndicators.AppliedPrice;
import com.dukascopy.api.IIndicators.MaType;
import com.dukascopy.api.drawings.IChartObjectFactory;
import com.dukascopy.api.drawings.IHorizontalLineChartObject;
import com.dukascopy.api.drawings.ILongLineChartObject;
import com.dukascopy.api.drawings.IShortLineChartObject;

/**
 * The strategy draws two lines on the chart - one below the current tick price on strategy start and one above it.
 * On every tick the strategy checks if any of the lines have been crossed. On every such cross an order gets created.
 * Lines are added to the chart in an unlocked mode which mens that they can be selected by the user and moved around.
 *
 */
public class TrendLineCross implements IStrategy {
   private IEngine engine;
   private IConsole console;
   private IHistory history;
   private IChart chart;
   

   @Configurable("Instrument")
   public Instrument instrument = Instrument.EURUSD;
   @Configurable("Amount")
   public double amount = 0.02;
   
   private int orderCount;
   private SimpleDateFormat sdf;
   private ITick lastTick;

   public void onStart(IContext context) throws JFException {
      this.engine = context.getEngine();
      this.console = context.getConsole();
      this.history = context.getHistory();
      this.chart = context.getChart(instrument);

      sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
      sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
      
      print("start");
      
      lastTick = history.getLastTick(instrument);
      drawLines(lastTick.getAsk());
   }

   public void onTick(Instrument instrument, ITick tick) throws JFException {
      if (instrument != this.instrument)
         return;
      
      //bid price crosses the above line - make BUY order
      if ( chart.get("lineAbove") != null
            && tick.getAsk() > chart.get("lineAbove").getPrice(0)
            && lastTick.getAsk() < chart.get("lineAbove").getPrice(0)){
         print(sdf.format(tick.getTime()) + " Above line crossed, make BUY");
         engine.submitOrder("buyOrder" + (++orderCount), instrument, OrderCommand.BUY, amount);
      }
      
      //bid price crosses the below line - make SELL order
      if (chart.get("lineBelow") != null
            && tick.getBid() < chart.get("lineBelow").getPrice(0)
            && lastTick.getBid() > chart.get("lineBelow").getPrice(0)){
         print(sdf.format(tick.getTime()) + " Below line crossed, make SELL");
         engine.submitOrder("buyOrder" + (++orderCount), instrument, OrderCommand.SELL, amount);
      }
      
      lastTick = tick;
   }

   
   //draws two horizontal lines - one 5 pips above the price, the other - 5 pips below the price
   private void drawLines(double price){
      
      IChartObjectFactory factory = chart.getChartObjectFactory();
      
        IHorizontalLineChartObject lineAbove = factory.createHorizontalLine("lineAbove", price + 0.0005);
        lineAbove.setColor(Color.GREEN);
        lineAbove.setAttrInt(ATTR_INT.WIDTH, 2);
        lineAbove.setText(" Above line ", SwingConstants.CENTER);
        //unlocked means that you can select the line and move it while strategy is running
        chart.addToMainChartUnlocked(lineAbove);
       
        IHorizontalLineChartObject lineBelow = factory.createHorizontalLine("lineBelow", price - 0.0005);
        lineBelow.setColor(Color.RED);
        lineBelow.setAttrInt(ATTR_INT.WIDTH, 2);
        lineBelow.setText(" Below line ", SwingConstants.CENTER);
        chart.addToMainChartUnlocked(lineBelow);
       
   }

   private void print(Object message) {
      console.getOut().println(message);
   }
   
   //close all orders on strategy stop and remove both lines if they have not been removed already
   public void onStop() throws JFException {
      for (IOrder order : engine.getOrders()) {
         engine.getOrder(order.getLabel()).close();
      }
      chart.remove("lineAbove");
      chart.remove("lineBelow");
   }
   

   public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {   }


   public void onAccount(IAccount account) throws JFException {   }

   public void onMessage(IMessage message) throws JFException {   }

}


I'm really interested in trade trend line breakout automatically.
I've tried this code above and it works fine with flat trend lines. Problems comes when the trend line is tilted.

I draw a Long Line instead of an Horizontal Line, but I can't get the exact point where the trend line pass in the current bar. If I use "chart.get("lineAbove").getPrice(0)" I get the first drawing point of the trend line (marked in orange in the following picture), if I use "chart.get("lineAbove").getPrice(1)" I get the second point (marked in red).

For the cross above, for example, I'm still using the original code:

//bid price crosses the above line - make BUY order
if ( chart.get("lineAbove") != null && tick.getAsk() > chart.get("lineAbove").getPrice(0) && lastTick.getAsk() < chart.get("lineAbove").getPrice(0)){
console.getOut().println(sdf.format(tick.getTime()) + " Above line crossed, make BUY");
engine.submitOrder("buyOrder" + (++orderCount), instrument, OrderCommand.BUY, amount);
}

How can I get the value of my trend line in the current bar? I need to know the value of the trend line marked in the yellow circle.

Image

Thanks in advance


 
 Post subject: Re: Is possible to trade trendline breakout? Post rating: 0   New post Posted: Wed 15 May, 2013, 07:16 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Enkidu wrote:
I need to know the value of the trend line marked in the yellow circle.
You need to apply some trigonometry, have a look at the following examples:
https://www.dukascopy.com/wiki/#Ray_line_prices_by_shift


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com