Coding in PI

Hi,

I have read the help guide about TradeScript. I am writing code but I have below few questions,

  • After writing TradeScript statment, how can we compile it to check for syntax error. As I have written few statment and when tried to run backtest, got syntax error without much information about line number or which statement.
  • How can I write TradeScript statement that will show me Buy or Sell signal on chart in realtime? Any example would be good.
  • Once I will apply my script as EA then will it show me realtime buy sell signal? Till now tried different EA but none of them generated buy sell signal even statement was very simple. Please note I am not looking for alerts, I want to see visual Buy Sell Signal.

Please help me to understand above. I have my own strategy and want to implement it in PI, hoping end result would be amazing.

I am software professional, having coding background. Hoping to learn PI so I can write code myself without bugging you guys.

After writing the Tradescript you can check with backtest, if there any syntax error it will show by popup

For Buy and Sell Alerts in Real time you can use on Alerts->Create Scripted Alerts

There are lots of Examples in 
http://tradingqna.com/algos-strategies-and-code
https://zerodha.com/expert-advisors/

Make sure you are applying for the right script according to condition matchings and you can also use more number of Bar History in backtest to check Buy and Sell Signals.

You can create and apply your own stratagy and also can create as expert advisor.

All the Best !

It will take time for me to learn PI coding. Meanwhile I dont want to waste time. I lost 10-15% in just 2 days. Can you please provide me PI script for harmonic pattern. I have afl code, if you want to refer I can provide that or you can search on net. Please help.