Replies

artcfd
23 May 2023, 15:33 ( Updated at: 21 Dec 2023, 09:23 )

RE:

ncel01 said:Brother, you raised a very constructive question and I am keeping an eye on it.

Hi Panagiotis,

To clarify:

It's okay if someone makes a mistake, that happens and it is normal.

What I would like to know is if, at the moment the wrong swaps have been applied, these have been reflected in the trading conditions or not. In other words, I'd like to know if the trading conditions shown in cTrader are, without fail, always liked to the real conditions applied or not.

No need to explain how serious the implications can be in case of a mismatch here.

Rather than qualifying pertinent/uncomfortable questions as a conspiracy, it would be great to see those clarified.

Also, don't expect me to believe that traders and brokers play on the same team.

In fact I don't think that the applicable conditions and the conditions shown are always matching. Why?

Below is an example taken some time ago for a certain broker. Lot size is in fact not $1 but 1 unit.

Am I wrong by thinking this is not a detail and it can have serious implications on any trading account? I don't think so.

Swaps: do not deserve any comments.

 


@artcfd

artcfd
23 May 2023, 09:53

Which broker is this? Say it and let's all be warned.


@artcfd

artcfd
10 May 2023, 12:19

I agree with you, and the layout makes very little sense.


@artcfd

artcfd
06 Dec 2021, 13:17

RE:

amusleh said:

Hi,

If mouse cursor is over order/alert lines then none of the mouse events will work, and the chart mouse leave event will be triggered.

To solve this issue you can hide the cTrader order/alert lines and instead manage your orders only with your own quick order tool.

Here is an example on how you can capture the last mouse cursor location:

using cAlgo.API;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class Test : Robot
    {
        private double _lastMouseX, _lastMouseY;

        protected override void OnStart()
        {
            Chart.MouseMove += Chart_MouseMove;
            Chart.MouseEnter += Chart_MouseEnter;
            Chart.MouseLeave += Chart_MouseLeave;
        }

        // This event will be triggered if mouse cursor goes over chart order/alert lines
        // When this event got triggered all other mouse events will stop working as the cursor is not over chart
        private void Chart_MouseLeave(ChartMouseEventArgs obj)
        {
        }

        // This event will be triggered if mouse cursor cameback to chart from order/alert lines
        // When this event got triggered all mouse events will start working back
        private void Chart_MouseEnter(ChartMouseEventArgs obj)
        {
        }

        private void Chart_MouseMove(ChartMouseEventArgs obj)
        {
            _lastMouseX = obj.MouseX;
            _lastMouseY = obj.MouseY;
        }
    }
}

 

Dear Sir:

"Quicktrade" is not affected by the order/alarm line. It would be great if our button could be dragged and dropped to any place like the "Quicktrade" button. After hiding the cTrader order/alarm line, there is no even the button to close the order. In addition, the order line and the alarm line themselves only have the function of prompting, and there is no operation meaning, because the move/double/close all need to click the leftmost button , I don’t know why the line affects the mouse event. I hope the team will consider solving the problem of cTrader order/alarm line affecting the order in the next version. You have also seen that more than I have encountered this trouble, many friends have encountered this Troubled. thanks.


@artcfd

artcfd
06 Dec 2021, 10:19

RE: RE: RE:

amusleh said:

xiao-linlong said:

PanagiotisCharalampous said:Hi Panagiotis

Hi xiao-linlong,

When I use Stop Loss/Limit to place an order, it cannot be placed on top of other orders or alarms, and the system "Quicktrade" button can be achieved by just pressing and dragging to any place I want to reach and then letting go

This is not true. You can place your orders using drag and drop wherever you want. Existing orders and price alerts do not affect you.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Can I use the events currently provided to create the same actions as the "Quicktrade" button? When I place a stop loss/limit order, can I put it on top of other orders or alerts?

bestregards,Thanks。

Hi,

Yes, you can, but there will be an issue with your order placement going over other order lines or price alert lines, for that you have to use mouse enter/leave events to capture the last position of mouse cursor.

HI,

"Quicktrade" is not affected by the order/alert line, so it would be nice to be able to drag and drop it anywhere you want, like the "Quicktrade" button. Also, the order and alert lines themselves only have the function of alerting, and do not have any meaningful operation, because moving or closing a position requires clicking the top button, so I don't know why the lines should affect mouse events.


@artcfd

artcfd
05 Dec 2021, 09:24

RE: RE: RE: RE: RE:

amusleh said:

xiao-linlong said:

amusleh said:What you mean is that if the mouse moves over the alert, order or pending order price or its stop loss and take profit lines, the mouse event will be cancelled.
What I want is to be able to press the "Prepare button" and then click on the chart to place a "Stop Loss/Limit" order.
Can you tell me if there is a solution? grateful.

xiao-linlong said:

amusleh said:

Hi,

The order and price alert lines are under chart and the mouse events will not work while cursor is over them.

You can use Chart mouse leave and enter events to get the latest cursor position, if you move mouse over these lines the chart mouse leave event will be triggered and when you move back to other areas of chart the mouse enter event will be triggered.

Mr. amusleh, is there any event to ignore the order and price alert line? Or is it possible to open the drag and drop so that it solves the problem perfectly, looking forward to the reply, thanks.

Hi,

As I said on my previous post, you can use Chart mouse enter/leave events, when cursor goes over those lines the mouse leave event will be trigged and when it goes back to other parts of chart the mouse enter event will be triggered.

 

Hi,

Can't you use the latest location of mouse before mouse enter/leave event?

I had the same problem as the original blogger, I tried his code and we had the same problem.


@artcfd

artcfd
05 Dec 2021, 08:49

RE: RE: RE: RE: RE:

amusleh said:

xiao-linlong said:

amusleh said:What you mean is that if the mouse moves over the alert, order or pending order price or its stop loss and take profit lines, the mouse event will be cancelled.
What I want is to be able to press the "Prepare button" and then click on the chart to place a "Stop Loss/Limit" order.
Can you tell me if there is a solution? grateful.

xiao-linlong said:

amusleh said:

Hi,

The order and price alert lines are under chart and the mouse events will not work while cursor is over them.

You can use Chart mouse leave and enter events to get the latest cursor position, if you move mouse over these lines the chart mouse leave event will be triggered and when you move back to other areas of chart the mouse enter event will be triggered.

Mr. amusleh, is there any event to ignore the order and price alert line? Or is it possible to open the drag and drop so that it solves the problem perfectly, looking forward to the reply, thanks.

Hi,

As I said on my previous post, you can use Chart mouse enter/leave events, when cursor goes over those lines the mouse leave event will be trigged and when it goes back to other parts of chart the mouse enter event will be triggered.

 

Hi,

Can't you use the latest location of mouse before mouse enter/leave event?

Hello sir.

I try but but it can't.

Can you tell me how to do it?


@artcfd

artcfd
03 Dec 2021, 11:24

RE:

PanagiotisCharalampous said:Hi Panagiotis

Hi xiao-linlong,

When I use Stop Loss/Limit to place an order, it cannot be placed on top of other orders or alarms, and the system "Quicktrade" button can be achieved by just pressing and dragging to any place I want to reach and then letting go

This is not true. You can place your orders using drag and drop wherever you want. Existing orders and price alerts do not affect you.

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Can I use the events currently provided to create the same actions as the "Quicktrade" button? When I place a stop loss/limit order, can I put it on top of other orders or alerts?

bestregards,Thanks。


@artcfd

artcfd
03 Dec 2021, 09:33

RE: RE: RE:

amusleh said:What you mean is that if the mouse moves over the alert, order or pending order price or its stop loss and take profit lines, the mouse event will be cancelled.
What I want is to be able to press the "Prepare button" and then click on the chart to place a "Stop Loss/Limit" order.
Can you tell me if there is a solution? grateful.

xiao-linlong said:

amusleh said:

Hi,

The order and price alert lines are under chart and the mouse events will not work while cursor is over them.

You can use Chart mouse leave and enter events to get the latest cursor position, if you move mouse over these lines the chart mouse leave event will be triggered and when you move back to other areas of chart the mouse enter event will be triggered.

Mr. amusleh, is there any event to ignore the order and price alert line? Or is it possible to open the drag and drop so that it solves the problem perfectly, looking forward to the reply, thanks.

Hi,

As I said on my previous post, you can use Chart mouse enter/leave events, when cursor goes over those lines the mouse leave event will be trigged and when it goes back to other parts of chart the mouse enter event will be triggered.

 


@artcfd

artcfd
03 Dec 2021, 09:10

RE: RE: RE:

amusleh said:Dear Sir, you may have misunderstood, what I want is to be able to press the "Ready button" and then click on the next "Stop/Limit" order on the chart.

xiao-linlong said:

amusleh said:

Hi,

The order and price alert lines are under chart and the mouse events will not work while cursor is over them.

You can use Chart mouse leave and enter events to get the latest cursor position, if you move mouse over these lines the chart mouse leave event will be triggered and when you move back to other areas of chart the mouse enter event will be triggered.

Mr. amusleh, is there any event to ignore the order and price alert line? Or is it possible to open the drag and drop so that it solves the problem perfectly, looking forward to the reply, thanks.

Hi,

As I said on my previous post, you can use Chart mouse enter/leave events, when cursor goes over those lines the mouse leave event will be trigged and when it goes back to other parts of chart the mouse enter event will be triggered.

 


@artcfd

artcfd
03 Dec 2021, 08:51

RE: RE: RE:

amusleh said:Hello, sir, is it possible to reproduce the drag-and-drop function of the Quicktrade button in Automate?

xiao-linlong said:

amusleh said:

Hi,

The order and price alert lines are under chart and the mouse events will not work while cursor is over them.

You can use Chart mouse leave and enter events to get the latest cursor position, if you move mouse over these lines the chart mouse leave event will be triggered and when you move back to other areas of chart the mouse enter event will be triggered.

Mr. amusleh, is there any event to ignore the order and price alert line? Or is it possible to open the drag and drop so that it solves the problem perfectly, looking forward to the reply, thanks.

Hi,

As I said on my previous post, you can use Chart mouse enter/leave events, when cursor goes over those lines the mouse leave event will be trigged and when it goes back to other parts of chart the mouse enter event will be triggered.

 


@artcfd

artcfd
03 Dec 2021, 05:43

RE:

amusleh said:

Hi,

The order and price alert lines are under chart and the mouse events will not work while cursor is over them.

You can use Chart mouse leave and enter events to get the latest cursor position, if you move mouse over these lines the chart mouse leave event will be triggered and when you move back to other areas of chart the mouse enter event will be triggered.

Mr. amusleh, is there any event to ignore the order and price alert line? Or is it possible to open the drag and drop so that it solves the problem perfectly, looking forward to the reply, thanks.


@artcfd

artcfd
03 Dec 2021, 05:15

UP

UP


@artcfd

artcfd
30 Nov 2021, 09:42 ( Updated at: 21 Dec 2023, 09:22 )

RE: RE:

After the Drag & Drop button API is opened, you can change to set the Stop Loss and Stop Gain points to quickly drag and drop orders as shown in the chart.

1532928003 said:

小林龙 说道:

亲爱的ctrader团队,亲爱的论坛交易者,希望团队可以开放“合约”拖拽按钮API,以便您可以将该功能集成到您自己的快速交易面板中进行长短线交易,因为API可以开放快速移动,您的止损可以快速设置,非常实用。我希望你能投票支持它,谢谢。

This is excellent and supports openness.

 


@artcfd

artcfd
30 Nov 2021, 08:50 ( Updated at: 21 Dec 2023, 09:22 )

Dear ctrader team, dear forum traders, I hope the team can open the "Contracts" drag and drop button API, so that you can integrate the function into your own quick trading panel for long or short term trading, because the API can be opened to move quickly and your stop loss can be set quickly, quite practical. I hope you can vote for it, thanks.


@artcfd

artcfd
13 Sep 2021, 09:50

I'm waiting for this feature to be updated just like you.


@artcfd

artcfd
13 Sep 2021, 09:45

The first and second article I think very good, the third article if there is no loss amount can obviously not just according to the stop loss point to calculate the size of the position, this ctrader should not do, the first article second article I voted for.


@artcfd

artcfd
08 Sep 2021, 11:26

Some suggestions.

Hi blogger, is it possible to change the limit in the panel to the kind of drag and drop that comes with the system? Instead of entering the price of the limit manually, the input is not as convenient as the direct drag and drop. Because it already has fragmentation and stop loss function.


@artcfd

artcfd
07 Sep 2021, 14:55

RE: Please post more ideas up later, we really like your thinking, thanks. I was running around forwarding you that trading panel and eventually it was solved.

waym77 said:

Hi all,

I spent some time attempting to figure all of this out on my own, but no luck so far.

I've added some code snippets for reference, as the source for this bot has gotten kind of long so far.

The basic problem: to output the value of a variable to a textbox (chart object).

The code has an existing method of retrieving the value of a textbox and assigning it to a variable. That method looks like this:
 

private double GetValueFromInput(string inputKey, double defaultValue)
        {
            double value;

            return double.TryParse(_inputMap[inputKey].Text, out value) ? value : defaultValue;
        }


An example of using the above method looks like this:

var _lots = GetValueFromInput(LotsInputKey, 0);

In the above example, LotsInputKey is the assigned variable of the textbox.

 

What I am looking for is basically the exact opposite of this; a way to set the value of a textbox equal to a variable.

I am not even entirely sure if a method would be the best way to accomplish this, which is why I'm asking

Any advice would be greatly appreciated, thanks.

 


@artcfd

artcfd
23 Aug 2021, 07:59

RE: RE: Hotkey Trade Operations can be done by Code

dwalkhul said:This problem you describe I also thought of, keyboard trading is not a good idea, the following link blogger introduced this way quite good, you can consider considering.

PanagiotisCharalampous said:

Hi Tj,

You can read what a product backlog is here :)

Best Regards,

Panagiotis 

Join us on Telegram

Re below clause 2.   On reassement I consider the product not fit for reference and have withdrawn information.

Objectives:

  • Implementing cTrader hotkey trade operations by means of cAlgo/C# code offers superior versatility and customization than any future cTrader inbuilt trade operation hotkey functionality -  which will, if ever implemented, almost certainly be hotkey combinations (a key + another key) as opposed to a trade operation activated by a 'single key'.
  • Key combinations defeats the entire purpose of easy of use, speed, and efficiency - the additional use of an additional key to effect the trade operation is an unnecessary distraction.
  • The use of a single key for a trade operation is fast, most efficient and excludes additional distractions.
  • The use of single key trade functionality by means of code works to perfection - with respect my coding experience - in MT4/MT5 and Sierra Chart without conflicting or interfering with other programs that may use any on the same single hotkey or combination of hotkeys.

In MQL5 Chart Key Events are fairly straightforward.

#include <Trade\Trade.mqh>
//--- object of class CTrade
CTrade trade;
#include <Trade\PositionInfo.mqh>
CPositionInfo  m_position;      
#include <Trade\SymbolInfo.mqh>  
CSymbolInfo    m_symbol; 
#include <Trade\OrderInfo.mqh>
COrderInfo     m_order;   
......
......
#define KEY_AR_UP 38 // NL Up Arrow// BUY AT ASK
#define KEY_UP 104 // Up Arrow // BUY AT ASK
......
......
// BUY at Ask (market) /////////////////////
if(lparam == KEY_UP || lparam == KEY_AR_UP)
{
  cl=0;
  trade.Buy(LotSizex, NULL, SymbolInfoDouble(Symbol(),SYMBOL_ASK), SymbolInfoDouble(Symbol(),
  SYMBOL_ASK) - StopLoss*_Point, 0, NULL); 
  PlaySound(SND);
}

So here is the question and request:

  1. Can you kindly point to a source of understand Chart Key Events in cAlgo.
  2. If not, how then, is Chart Key Events being implemented in the above referred bot ?

 

 


@artcfd